-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathESYRCRTN.cpp
34 lines (27 loc) · 890 Bytes
/
ESYRCRTN.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include<bits/stdc++.h>
#define ll long long int
#define watch(x) cout << (#x) << " is " << (x) << endl //watch function print variable and value for debugging
#define count_ones __builtin_popcountll // count_ones(9) is equal to 2 valid for ll also
#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL);
#define fo(i,n) for(ll i=0;i<n;i++)
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
fast_io
ll t;
cin>>t;
while(t--)
{
ll n;
cin>>n;
ll a[]={1,4,6,5,2,0};
cout<<(a[(n-1)%6])<<"\n";
}
return 0;
}
/*******************************************************
WRONG QUESTION(ERROR)
**********************************************************/