求A^B的最后三位数表示的整数。
说明:A^B的含义是“A的B次方”

 

思路:后三位只跟后三位相乘有关,所以可以每乘一次都对1000取余。

 

代码:

#include <stdio.h>
#include <stdlib.h>

int main()
{
  int result,i,m,n;
  while(scanf("%d%d",&m,&n)!=EOF&&(m||n))
  {
  result=1;
    for(i=0;i<n;i++){

  }
return 0;
}

相关文章:

  • 2022-01-13
  • 2021-11-12
  • 2021-12-20
  • 2021-06-03
  • 2021-11-30
  • 2021-04-17
  • 2021-12-12
  • 2021-11-07
猜你喜欢
  • 2021-11-12
  • 2021-11-12
  • 2021-11-06
  • 2021-11-24
  • 2022-02-02
  • 2021-08-16
  • 2021-11-11
相关资源
相似解决方案