6 条题解
-
0
#include<bits/stdc++.h> using namespace std; string s; string q[6]={"Guanyu","Zhangfei","Caocao","Diaochan","Zhugeliang","Simayi"};; int main() { char a; getline(cin,s); int z=s.size(),g=0,h=0; for(int x=0;x<z;x++){ g=s[x]+g; } //q[6]={"Guanyu","Zhangfei","Caocao","Diaochan","Zhugeliang","Simayi"}; h=g%6; cout<<q[h]; return 0; }
-
-2
#include<bits/stdc++.h> using namespace std; int main(){ string s; int a=0; cin>>s; for(int i=0;i<s.size();i++){ a=a+s[i]; } if(a%60) cout<<"Guanyu"; if(a%61) cout<<"Zhangfei"; if(a%62) cout<<"Caocao"; if(a%63) cout<<"Diaochan"; if(a%64) cout<<"Zhugeliang"; if(a%65) cout<<"Simayi"; }
- 1
信息
- ID
- 2080
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- 递交数
- 105
- 已通过
- 48
- 上传者