A. Minimum Integer

签到。

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 #define ll long long
 5 ll l, r, d;
 6 
 7 int main()
 8 {
 9     int t; scanf("%d", &t);
10     while (t--)
11     {
12         scanf("%lld%lld%lld", &l, &r, &d);
13         if (d < l) printf("%lld\n", d);
14         else printf("%lld\n", ((r / d) + 1) * d);
15     }
16     return 0;
17 }
View Code

相关文章:

  • 2021-06-03
  • 2021-11-21
  • 2021-09-07
  • 2021-06-24
  • 2021-06-23
  • 2022-01-27
  • 2022-01-11
猜你喜欢
  • 2022-12-23
  • 2022-01-15
  • 2022-02-15
  • 2021-09-20
  • 2021-06-05
  • 2021-10-25
  • 2021-12-03
相关资源
相似解决方案