1 条题解

  • 1
    @ 2024-8-8 17:31:06
    #include<bits/stdc++.h>
    using namespace std;
    #define int long long
    int a,b,p=1;
    signed main(){
        scanf("%d%d",&a,&b);
    	for(int i=0;i<b;i++) {//需计算b次
    		p*=a;
    		p%=1000;//对1000取余
    	}
    	printf("%03d",p);//这里是用0补足三位输出
    	return 0;
    }
    

    信息

    ID
    676
    时间
    1000ms
    内存
    128MiB
    难度
    9
    标签
    递交数
    7
    已通过
    6
    上传者