Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- freopen("powerstower.in", "r", stdin);
- freopen("powerstower.out", "w", stdout);
- int n;
- cin >> n;
- int a0;
- cin >> a0;
- a0 %= 3;
- if(a0 == 0) cout << 0;
- else if(a0 == 1) cout << 1;
- else if(n == 1) cout << 2;
- else{
- int a1;
- cin >> a1;
- if(a1 % 2 == 1) cout << 2;
- else cout << 1;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment