CodeForces - 821B Okabe and Banana Trees(阅读题)
2017-08-24 10:37
295 查看
读读题意推个公式就好了~
代码:
#include<bits/stdc++.h> using namespace std; int m,b; int main() { scanf("%d%d",&m,&b); long long int best=0; for(int i=0;i<=b;i++) { long long int y=i;long long int x=(long long int)m*(long long int)(b-y); //if(x<0)continue; long long int t=(x+y)*(x+1)*(y+1)/2; if(best<t)best=t; } printf("%lld",best); }
相关文章推荐
- codeforces 438D 分类: codeforces 2015-03-28 10:18 38人阅读 评论(0) 收藏
- CodeForces - 818A Diplomas and Certificates(阅读题)
- CodeForces - 820A Mister B and Book Reading(阅读题)
- CodeForces - 822A I'm bored with life(阅读题)
- CodeForces 315E - Sereja and Subsequences 阅读理解+树状数组
- codeforces #309 div2 分类: codeforces 2015-06-26 20:11 21人阅读 评论(0) 收藏
- CodeForces - 835A Key races(阅读题)
- CodeForces - 835B The number on the board(阅读题)
- CodeForces - 821A Okabe and Future Gadget Laboratory(阅读题)
- codeforces 842 A. Kirill And The Game(阅读题)
- CodeForces - 822B Crossword solving(阅读题)
- CodeForces - 841A Generous Kefa(阅读题)
- codeforces 558C 分类: codeforces 2015-08-08 14:15 9人阅读 评论(0) 收藏
- Codeforces 343D Water Tree 分类: Brush Mode 2014-10-05 14:38 98人阅读 评论(0) 收藏
- codeforces 546E 分类: codeforces 2015-05-27 20:33 36人阅读 评论(0) 收藏
- CodeForces 825A Multi-judge Solving(阅读题)
- codeforces 366D 分类: codeforces 2015-08-09 17:38 9人阅读 评论(0) 收藏
- CodeForces - 816A Karen and Morning(阅读题)
- 【codeforces】378BParade(简单思维+英语阅读理解-.-)
- codeforces #310 div2 D 分类: codeforces 2015-06-29 20:03 29人阅读 评论(0) 收藏