nyoj-473-A^B Problem
来源:互联网 发布:java上传excel并解析 编辑:程序博客网 时间:2024/06/05 23:55
#include<stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{
int sum=1,t,i;
if(a==0)
printf("0\n");
else if(b==0)
printf("1\n");
else
{
t=(b%4==0?4:b%4);
a%=10;
for(i=0;i<t;i++)
sum*=a;
printf("%d\n",sum%10);
}
}
return 0;
}
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{
int sum=1,t,i;
if(a==0)
printf("0\n");
else if(b==0)
printf("1\n");
else
{
t=(b%4==0?4:b%4);
a%=10;
for(i=0;i<t;i++)
sum*=a;
printf("%d\n",sum%10);
}
}
return 0;
}
0 0
- nyoj-473-A^B Problem
- NYOJ - A*B Problem
- NYOJ - A-B Problem
- NYoj A*B Problem
- NYOJ-A^B Problem
- NYOJ-A/B Problem
- NYOJ A-B Problem
- NYOJ A-B Problem
- NYOJ---A+B Problem II
- NYOJ 524 A-B Problem
- NYOJ - A+B Problem II
- NYOJ 485 A*B Problem
- NYOJ.524.A-B Problem
- nyoj-485-A*B Problem
- NYOJ 1 A+B Problem
- nyoj 485 A*B Problem
- nyoj 524 A-B Problem
- NYOJ 485 A*B Problem
- IOS AlertView 自动消失
- excel格式 _ * #,##0_ ;_ * -#,##0_ ;_ * "-"_ ;_ @_
- Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
- mysql 远程连接速度慢的解决方案
- Hive 内建操作符与函数开发
- nyoj-473-A^B Problem
- 使用js的正则表达式删除字符串两边的空格
- MySQL错误:You are using safe update mode and you tried to update a table without a WHERE that uses
- 放飞艺术的梦想,展望美好的未来
- 收集资源
- 东软睿道实训日记——第八天
- 关于延迟调用
- POM.xml详解
- 自娱自乐