Description
Johny likes numbers n and k very much. Now Johny wants to find the smallest integer x greater than n, so it is divisible by the number k.
The only line contains two integers n and k (1 ≤ n, k ≤ 109).
Print the smallest integer x > n, so it is divisible by the number k.
5 3
6
25 13
26
26 13
39
嗯,这个就没必要说了吧,找n与k的关系
1 #include<iostream> 2 #include<stdio.h> 3 #include<algorithm> 4 #include<string.h> 5 using namespace std; 6 int a,b,c; 7 long long n,t; 8 int main() 9 { 10 long long k; 11 long long sum; 12 cin>>n>>k; 13 cout<<(n/k+1)*k<<endl; 14 return 0; 15 }