help me(为什么只得了20分)
查看原帖
help me(为什么只得了20分)
1549214
liuheqinghans0106楼主2025/1/28 15:11
#include <bits/stdc++.h>
using namespace std;

int main() {
	int a,b; 
	cin>>a>>b;
	long long s=a;
	for(int i=0;i<b-1;i++){
		s=s*a; 
	}
	int t=(s-1)%7+1;
	if(t==1){
		cout<<"Monday";
	}
	if(t==2){
		cout<<"Tuesday";
	}
	if(t==3){
		cout<<"Wednesday";
	}
	if(t==4){
		cout<<"Thursday";
	}
	if(t==5){
		cout<<"Friday";
	}
	if(t==6){
		cout<<"Saturday";
	}
	if(t==7){
		cout<<"Sunday";
	}
	return 0;
}
2025/1/28 15:11
加载中...