Problem A

Statement
Copy Copied
Description:
Polycarp knows that if the sum of the digits of a number is divisible by $$$3$$$, then the number itself is divisible by $$$3$$$. He assumes that the numbers, the sum of the digits of which is divisible by $$$4$$$, are also somewhat interesting. Thus, he considers a positive integer $$$n$$$ interesting if its sum of digits is divisible by $$$4$$$.

Help Polycarp find the nearest larger or equal interesting number for the given number $$$a$$$. That is, find the interesting number $$$n$$$ such that $$$n \ge a$$$ and $$$n$$$ is minimal.

Input Format:
The only line in the input contains an integer $$$a$$$ ($$$1 \le a \le 1000$$$).

Output Format:
Print the nearest greater or equal interesting number for the given number $$$a$$$. In other words, print the interesting number $$$n$$$ such that $$$n \ge a$$$ and $$$n$$$ is minimal.

Note:
None

Submissions

IDLanguageExit CodeTimestampCodeStdoutStderrRetry
5931 go 0 2026-03-23T03:49:35.747844Z View View View Retry

Evaluations

Eval IDRun IDProviderModelLangSuccessTimestampPromptResponseStdoutStderrRetry
3451 20260322-220006 openai gpt-5.4 go false 2026-03-22T22:00:12.374335Z View View View View Retry