CF678A.Johny Likes Numbers

入门

通过率:0%

时间限制:0.50s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

约翰非常喜欢数字 nn 和 kk。现在约翰想找到大于 nn 的最小整数 xx,使得 xx 能被 kk 整除。

输入格式

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

唯一的一行包含两个整数 nn 和 kk(1 ≤ n, k ≤ 1091 ≤ n, k ≤ 10^9)。

输出格式

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

输出大于 nn 的最小整数 xx,使得 xx 能被整数 kk 整除。

输入输出样例

  • 输入#1

    5 3

    输出#1

    6
  • 输入#2

    25 13

    输出#2

    26
  • 输入#3

    26 13

    输出#3

    39

输入解题思路,AI测评打分。不知道怎么写?

首页