Codeforces Round #443 (Div. 2)

 

codeforces 879 A. Borya's Diagnosis【水题】

 1 #include<cstdio>
 2 #include<cstring>
 3 #include<algorithm>
 4 using namespace std;
 5 int main(){
 6     int n, t = 0, s, d;
 7     scanf("%d", &n);
 8     while(n--) {
 9         scanf("%d%d", &s, &d);
10         while(s <= t) {s += d;}
11         t = s;
12     }
13     printf("%d\n", t);
14     return 0;
15 }
78ms

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-06-05
  • 2022-01-12
  • 2021-10-29
  • 2022-12-23
猜你喜欢
  • 2021-07-31
  • 2022-01-13
  • 2021-09-29
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案