题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=56
C语言源码:
#include<stdio.h>
int main()
{
int a,b,c,i;
scanf("%d %d",&a,&b);
while(a!=0||b!=0)
{
c=1;
for(i=1;i<=b;i++)
c=(c*a)%1000;
printf("%d\n",c);
scanf("%d %d",&a,&b);
}
}
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=56
C语言源码:
#include<stdio.h>
int main()
{
int a,b,c,i;
scanf("%d %d",&a,&b);
while(a!=0||b!=0)
{
c=1;
for(i=1;i<=b;i++)
c=(c*a)%1000;
printf("%d\n",c);
scanf("%d %d",&a,&b);
}
}