a53

2lan

a53
Apr 2nd, 2020
134
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <fstream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. ifstream f("2lan.in");
  8. f>>n;
  9. f.close();
  10. ofstream g("2lan.out");
  11. if(n==0)
  12. g<<1<<'\n';
  13. else
  14. switch(n%4)
  15. {
  16. case 0:g<<6<<'\n';break;
  17. case 1:g<<2<<'\n';break;
  18. case 2:g<<4<<'\n';break;
  19. case 3:g<<8<<'\n';break;
  20. }
  21. g.close();
  22. return 0;
  23. }
RAW Paste Data