2035hdu

点击打开链接

博客一

题目二

#include<stdio.h>
int main()
{
     int n,m,mul;
      while(~scanf("%d%d",&n,&m)&&(n||m))
      {      
mul = n;
 while(m>1)
 {
 n=n*mul;
 n=n%1000;
 m--;
 }
        printf("%d
",n);
    }
     return 0;
 }


原文地址:https://www.cnblogs.com/qie-wei/p/12094149.html