您的位置:首页 > 其它

Educational Codeforces Round 13 A

2016-06-15 11:54 288 查看
[b]Description[/b]

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.

Input
The only line contains two integers n and k (1 ≤ n, k ≤ 109).

Output
Print the smallest integer x > n, so it is divisible by the number k.

Examples

input
5 3


output
6


input
25 13


output
26


input
26 13


output
39
嗯,这个就没必要说了吧,找n与k的关系


#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
int a,b,c;
long long n,t;
int main()
{
long long k;
long long sum;
cin>>n>>k;
cout<<(n/k+1)*k<<endl;
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: