Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- //*****************Data type**********************//
- typedef long long ll;
- typedef long long int lli;
- typedef unsigned long long ull;
- typedef unsigned long long int ulli;
- //*****************Map****************************//
- typedef map<int, int> MII;
- typedef map<int, string> MIS;
- typedef map<int, char> MIC;
- typedef map<string, int> MSI;
- typedef map<char, int> MCI;
- //****************Pair****************************//
- typedef pair<int, int> PII;
- typedef pair<string, string> PSS;
- typedef pair<char, char> PCC;
- typedef pair<int, string> PIS;
- typedef pair<int, char> PIC;
- //*****************Vector************************//
- typedef vector<int> VI;
- typedef vector<string> VS;
- typedef vector<double> VD;
- typedef vector<lli> VLLI;
- typedef vector<VI> VVI;
- typedef vector<PII> VPI;
- //-------------------------------------------------------------------------------//
- #define pp1(A) printf("%d\n",A)
- #define pp2(A,B) printf("%d %d\n",A,B)
- #define pp3(A,B,C) printf("%d %d %d\n",A,B,C)
- #define ss1(A) scanf("%d", &A)
- #define ss2(A,B) scanf("%d,%d",&A,&B)
- #define ss3(A,B,C) scanf("%d,%d,%d",&A,&B,&C)
- //--------------------------------------------------------------------------------//
- #define nosync ios_base::sync_with_stdio(false), cin.tie(NULL)
- #define pf push_front
- #define pb push_back
- #define pop pop_back()
- #define mk make_pair
- #define PF first
- #define PS second
- #define sq(a) (a)*(a)
- #define ALL(a) a.begin(), a.end()
- #define Erase(V,I) V.erase(V.begin()+I)
- #define Insert(V,I,M) V.insert(V.begin()+I,M)
- //********************************************************************************//
- #define FOR(i,x,y) for(int i=x;i<y;i++)
- #define RFOR(i,x,y) for(int i=x;i>=y;i--)
- #define scanVI(V, N) for(int i=0; i<N; i++){ int X; ss1(X); V.pb(X); }
- #define scanAI(A, N) for(int i=0; i<N; i++){ ss1(A[i]); }
- #define printVI(V, N) for(int i=0; i<N; i++){ cout<<V[i]<<endl; }
- #define printVSI(V, N) for(int i=0; i<N; i++){ cout<<V[i]<<" "; }
- #define printAI(A, N) for(int i=0; i<N; i++){ cout<<A[i]<<endl; }
- #define printASI(A, N) for(int i=0; i<N; i++){ cout<<A[i]<<" "; }
- //---------------------------------*START*-----------------------------------------//
- int sum(int x)
- {
- if(x>=1)
- {
- int r=x%10;
- //cout<<r<<endl;
- int d=x/10;
- //cout<<"ok"<<endl;
- //int r=x%10;
- return r+sum(d);
- }
- }
- int main()
- {
- int a;
- cin>>a;
- int temp=a;
- //cout<<temp%10<<endl;
- while(1)
- {
- int rs=sum(temp);
- if(rs%4==0)
- {
- cout<<temp<<endl;
- break;
- }
- temp++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement