HD1097
作者:互联网
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1097
#include <bits/stdc++.h>//万能开头;
using namespace std;
int main()
{
int a,b,c;
while(scanf("%d %d",&a,&b)!=EOF)
{
while(a>=10)
a%=10;
b=b%4;
if(b==0)
b=4;
c=pow(a,b);
while(c>=10)
c%=10;
printf("%d\n",c);
}
return 0;
}
标签:10,cn,b%,int,pow,while,HD1097 来源: https://blog.csdn.net/qq_52029941/article/details/115358203