首页 > 学院 > 开发设计 > 正文

CodeForces - 678A

2019-11-06 07:12:43
字体:
来源:转载
供稿:网友

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.

ExampleInput
5 3Output
6Input
25 13Output
26Input
26 13Output

39

//// Created by liyuanshuo on 17-3-5.//#include <iostream>using namespace std;int main5( ){	//freopen("/home/liyuanshuo//ClionProject/C4Practice1/in.in", "r", stdin);	int n, k;	cin>>n>>k;	cout<<k*(n/k+1)<<endl;	return 0;}


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表