1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
   | #include <iostream> using namespace std; int n; bool check(int n) {     int ans = 0;     while (n) {         ans += n % 10;         n /= 10;     }     return ans % 4 == 0; }
  int main() {     cin >> n;     while (!check(n)) ++n;     cout << n << endl;     return 0; }
   |