必对题解
2025-09-01 18:12:41
发布于:天津
17阅读
0回复
0点赞
代码如下:
#include<bits/stdc++.h>
using namespace std;
void f(int a,int b){
int s=1;
for(int i=1;i<=b;i++){
s*=a;
s%=7;
}
if(s==0)cout<<7;
else cout<<s;
}
int main(){
int a,b;
cin>>a>>b;
f(a,b);
return 0;
}
全部评论 1
程序对的话请点一个赞
6天前 来自 天津
0
有帮助,赞一个