A. Johny Likes Numbers

来源:互联网 发布:网络大电影受众 编辑:程序博客网 时间:2024/04/29 22:13

time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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


解题说明:水题,数学知识。


#include<cstdio>#include <cstring>#include<cmath>#include<iostream>#include<algorithm>#include<vector>#include <map>using namespace std;int main(){    int n,k;    scanf("%d%d",&n,&k);    printf("%d\n",k*(n/k+1));return 0;}


0 0