CodeForces - 820A Mister B and Book Reading
2017-08-31 15:36
369 查看
//水题 #include <bits/stdc++.h> using namespace std; int main() { int c, v0, v1, a, l; while (cin >> c >> v0 >> v1 >> a >> l) { int day = 0; if (v0 >= c) { cout << 1 << endl; continue; } day++; c -= v0; int flag = 1; while (1) { c += l; v0 += a; if (v0 > v1) v0 = v1; if (v0 >= c) { flag = 0; cout << ++day; break; } c -= v0; day++; } if (!flag) continue; else cout << day << endl; } return 0; }
相关文章推荐
- Codeforces 884 Book Reading
- CodeForces - 820A Mister B and Book Reading(阅读题)
- codeforces 820A. Mister B and Book Reading 解题报告
- CodeForces 820A Mister B and Book Reading
- Codeforces 820A Mister B and Book Reading
- codeforces 471C MUH and House of Cards 数论
- CodeForces 304C Lucky Permutation Triple(推理分析)
- Codeforces 659E New Reform【DFS】
- codeforces 714C Sonya and Queries [思维]【STL】
- codeforces 2016-2017 NTUWFTSC E Lines Game
- (CodeForces 883A) The Meaningless Game 纯正的数学思维题(有点卡cin时间)
- Codeforces 233A-Perfect Permutation(规律)
- CodeForces 305B Continued Fractions【递推的分式】
- CodeForces 632E Thief in a Shop(FFT)
- [无源汇最大费用可行流 差分费用流] Codeforces 717G Bubble Cup 9 - Finals G. Underfail
- codeforces 780B - The Meeting Place Cannot Be Changed 二分
- Codeforces 122 D. Lucky Transformation (规律)
- codeforces 之 Design Tutorial: Make It Nondeterministic
- CodeForces 610A Pasha and Stick
- Codeforces 659E New Reform 【DFS 求环】