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≥a and n is minimal.
Input
The only line in the input contains an integer a (1≤a≤1000).
Output
Print the nearest greater or equal interesting number for the given number a. In other words, print the interesting number n such that n≥a and n is minimal.
Examples
Input
432
Output
435
Input
99
Output
103
Input
237
Output
237
Input
42
Output
44

英文题目真难读
题意:给定一个各位数相加能被3整除的数(即被3整除),让你求一个比这个数大的,各位数加起来能被4整除的数。
最多判断4个数,暴力计算即可。

#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    long  long n;
    cin>>n;
    while(1)
    {
        long long k=n,cnt=0;
        while(k)
        {
            cnt+=k%10;
            k/=10;
        }
        if(cnt%4==0) {cout<<n;return 0;}
        ++n;
    }
    return 0;
}