题目链接 #include <iostream>#include <cstdio>using namespace std;int mod_exp(int a, int b, int c) //快速幂取余a^b%c{int res, t;res = 1 % c; t = a % c;while (b){if (b & 1){res = res * t % c;}t = t *
题目 Given a positive integer N, you should output the most right digit of N^N. 给定一个正整数 N,您应该输出 N^N 的最右边的数字。 Input The input contains several test cases. The first line of the input is a single