Educational Codeforces Round 13 A

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.

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的关系
 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 }

 

posted @ 2016-06-15 11:54  樱花落舞  阅读(201)  评论(0编辑  收藏  举报