6 条题解

  • 0
    @ 2024-7-21 14:52:13

    #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; }

    信息

    ID
    2080
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    105
    已通过
    48
    上传者