竞赛
考级
#include<iostream> using namespace std; int main(){ int n; cin>>n; if(n%70) cout<<"monday"; if(n%71) cout<<"tuesday"; if(n%72) cout<<"wednesday"; if(n%73) cout<<"thursday"; if(n%74) cout<<"friday"; if(n%75) cout<<"saturday"; if(n%7==6) cout<<"sunday"; return 0; }
四斋臻瞎投
#include<iostream> using namespace std; int main(){ int n; cin >> n; n = (n + 1) % 7; if(n == 1) cout << "monday"; else if(n == 2) cout << "tuesday"; else if(n == 3) cout << "wednesday"; else if(n == 4) cout << "thursday"; else if(n == 5) cout << "friday"; else if(n == 6) cout << "saturday"; else if(n == 0) cout << "sunday"; return 0; }
源于惯性yoki
zsy
#include<iostream> #include <algorithm> #include <bits/stdc++.h> #include <math.h> #include <cmath> #include<string> #include<cstring> #include<list> #include<map> #include<queue> #include<iterator> #include<stack> using namespace std; int main(){ int a; int n; cin >> n; n = (n + 1) % 7; if(n == 1){ cout << "monday"; } else if(n == 2){ cout << "tuesday"; } else if(n == 3){ cout << "wednesday"; } else if(n == 4){ cout << "thursday"; } else if(n == 5){ cout << "friday"; } else if(n == 6){ cout << "saturday"; } else if(n == 0){ cout << "sunday"; } return 0; }
梦中情AC
没人想到用循环吗?
一只可爱的七七
#include<iostream> using namespace std; int main(){ int n; cin>>n; n=(n+1)%7; if(n1){ cout<<"monday"; } else if(n2){ cout<<"tuesday"; } else if(n3){ cout<<"wednesday"; } else if(n4){ cout<<"thursday"; } else if(n5){ cout<<"friday"; } else if(n6){ cout<< "saturday"; } else if(n==0){ cout<< "sunday"; } return 0; }
周哲
#include<iostream> using namespace std; int main() { int n; cin>>n; switch(n%7) { case 0:cout<<"monday";break; case 1:cout<<"tuesday";break; case 2:cout<<"wednesday";break; case 3:cout<<"thursday";break; case 4:cout<<"friday";break; case 5:cout<<"saturday";break; case 6:cout<<"sunday";break; } return 0; }
易政秾
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; a%=7; vector<string> b = {"monday","tuesday","wednesday","thursday","friday","saturday","sunday"}; cout<<b[a]; }
6.
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; n = (n + 1) % 7; if(n == 1) cout << "monday"; else if(n == 2) cout << "tuesday"; else if(n == 3) cout << "wednesday"; else if(n == 4) cout << "thursday"; else if(n == 5) cout << "friday"; else if(n == 6) cout << "saturday"; else if(n == 0) cout << "sunday"; return 0; }
风中雪zLyXj
醉词意
#include <bits/stdc++.h> using namespace std; int main(){ }
138****3587
MAN
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int to=(n+1)%7; switch(to) { case 1:cout<<"monday";break; case 2:cout<<"tuesday";break; case 3:cout<<"wednesday";break; case 4:cout<<"thursday";break; case 5:cout<<"friday";break; case 6:cout<<"saturday";break; case 0:cout<<"sunday";break; } return 0; }
大西瓜卷王
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; if(n>=7){ n%=7; } n+=1; if(n1){ cout << "monday"; }else if(n2){ cout << "tuesday"; }else if(n3){ cout << "wednesday"; }else if(n4){ cout << "thursday"; }else if(n5){ cout << "friday"; }else if(n6){ cout << "saturday"; }else if(n==7){ cout << "sunday"; } return 0; }
赵奕航
#include<bits/stdc++.h> using namespace std; string a[7]={"monday","tuesday","wednesday","thursday","friday","saturday","sunday"}; int main() { int n; cin>>n; cout<<a[n%7]; return 0; }
186****6026
6,真是简单 #include <iostream> using namespace std; int main(){ int week; cin >> week; int weeker; weeker = 1+week; while(weeker>7){ weeker=weeker-7; } switch(weeker){ case 1: cout << "monday";break; case 2: cout << "tuesday";break; case 3: cout << "wednesday";break; case 4: cout << "thursday";break; case 5: cout << "friday";break; case 6: cout << "saturday";break; case 7: cout << "sunday";break; } return 0; }
lwx
数组解了
队团加不)ด้้童帅_者仇复
a=['monday','tuesday','wednesday','thursday','friday','saturday','sunday'] b=input() b=int(b) c=b%7 print(a[c])
130****8464
#include<iostream> using namespace std; int main(){ long long a; cin>>a; if (a/70){ switch (a){ case 1:cout<<"tuesday";break; case 2:cout<<"wednesday";break; case 3:cout<<"thursday";break; case 4:cout<<"friday";break; case 5:cout<<"saturday";break; case 6:cout<<"sunday";break; } }else if (a%70){ cout<<"monday"; }else if (a%71){ cout<<"tuesday"; }else if (a%72){ cout<<"wednesday"; }else if (a%73){ cout<<"thursday"; }else if (a%74){ cout<<"friday"; }else if (a%75){ cout<<"saturday"; }else if (a%76){ cout<<"sunday"; } return 0; }
186****1628
135****5307
共62条