- #include<iostream>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- while (n--)
- {
- int m;
- cin>>m;
- int a[10][5]={
- {0,0,0,0,0},
- {1,1,1,1,1},
- {6,2,4,8,6},
- {1,3,9,7,1},
- {6,4,6,4,6},
- {5,5,5,5,5},
- {6,6,6,6,6},
- {1,7,9,3,1},
- {6,8,4,2,6},
- {1,9,1,9,1}};
- cout<<a[m%10][m%4]<<endl;
- }
- return 0;
- }
杭电ACM1061N^N求最右边的数的问题
最新推荐文章于 2021-08-04 13:03:31 发布