#K49687. Oddland Number
Oddland Number
Oddland Number
You are given a non-negative integer N
. Your task is to find the smallest integer greater than or equal to N
whose sum of digits is odd.
To solve this problem, you should repeatedly check whether the sum of digits of the number is odd. If it is not, increment the number by 1 and check again.
This problem tests your ability to work with basic arithmetic, string manipulation, and loops. Note that if N
already satisfies the condition, you should print it directly.
inputFormat
The input consists of a single line containing an integer N
(1 ≤ N ≤ 109).
outputFormat
Output the smallest integer greater than or equal to N
whose sum of digits is odd.
47
47