cswork / OA打开练习工作台

General MotorsOA #2

Come Looking for the Smallest Num Which Must Be > Than a Specific Num.

估计简单可在线判题

考点(AI 标注)位运算

Find the smallest X>Z such that digitSum(X)=2×digitSum(Z).

The standard input/output conventions and constraints added by this site are given under "Input".

输入格式

1≤Z≤500.

输出格式

Output X.

样例 1

输入:

10

输出:

11

样例 2

输入:

14

输出:

19

样例 3

输入:

99

输出:

9999

样例 4

输入:

1

输出:

2

样例 5

输入:

500

输出:

505