提交时间:2024-02-22 21:38:24
运行 ID: 41664
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin >> a; int b; cin >> b; int n = a; int i = 1; while(i<=b){ a *= n; i++; } if(n%7-1==1){ cout << "Monday"; } else if(n%7-1==2){ cout << "Tuesday"; } else if(n%7-1==3){ cout << "Wednesday"; } else if(n%7-1==4){ cout << "Thursday"; } else if(n%7-1==5){ cout << "Friday"; } else if(n%7-1==6){ cout << "Saturday"; } else if(n%7-1==7){ cout << "Sunday"; } return 0; }