题解 100% AC
2025-08-02 13:54:25
发布于:江苏
5阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c=1;
cin>>a>>b;
for(int i=1;i<=b;i++){
c*=a;
c%=7;
}
if(c==0){
cout<<"Sunday";
}else if(c==1){
cout<<"Monday";
}else if(c==2){
cout<<"Tuesday";
}else if(c==3){
cout<<"Wednesday";
}else if(c==4){
cout<<"Thursday";
}else if(c==5){
cout<<"Friday";
}else{
cout<<"Saturday";
}
return 0;
}
这里空空如也
有帮助,赞一个