hdoj1061专题

Rightmost Digit【HDOJ1061】

题目链接 #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 *