Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream f("2lan.in");
- ofstream g("2lan.out");
- int n, r,c;
- int main()
- {
- f >> n;
- if (n==0) c=1;
- else
- {
- r=n%4;
- if (r==1) c=2;
- if (r==2) c=4;
- if (r==3) c=8;
- if (r==0) c=6;
- }
- g << c;
- }
Advertisement
Add Comment
Please, Sign In to add comment