AlenAntonelli

742/A - Arpa’s hard exam and Mehrdad’s naive cheat

Jan 5th, 2019
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2. #define ll long long
  3. using namespace std;
  4. int main ()
  5. {
  6.     ll n;
  7.     cin>>n;
  8.  
  9.     if (!n)
  10.         cout<<1;
  11.     else
  12.     {
  13.         n %= 4;
  14.         int v[] = {6,8,4,2};
  15.         cout<<v[n];
  16.     }
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment