6 条题解

  • 4
    @ 2024-7-21 11:57:00

    #include<bits/stdc++.h> using namespace std; string s; string c[6]={"Guanyu","Zhangfei","Caocao","Diaochan","Zhugeliang","Simayi"}; int main(){ int a=0,b; cin>>s; for(int i=0;i<=s.size();i++){ a+=s[i]; b=a%6; } cout<<c[b]; return 0; }

    • 1
      @ 2024-9-14 21:53:46
      #include <bits/stdc++.h>
      using namespace std;
      string s;
      string c[6]={"Guanyu","Zhangfei","Caocao","Diaochan","Zhugeliang","Simayi"};
      int main(){
      int a=0,i,b;
      cin>>s;
      for(i=0;i<=s.size();i++){
      	a+=s[i];
      	b=a%6;
      }
      cout<<c[b];
      	return 0;
      }
      • 1
        @ 2024-9-14 21:45:42
        #include<bits/stdc++.h> 
        using namespace std; 
        string s; 
        string c[6]={"Guanyu","Zhangfei","Caocao","Diaochan","Zhugeliang","Simayi"}; 
        int main(){ 
           int a=0,b; 
           cin>>s; 
           for(int i=0;i<=s.size();i++){  
             a+=s[i]; 
             b=a%6; 
           } 
           cout<<c[b]; 
           return 0; 
        }
        • 0
          @ 2024-9-14 21:45:17

          #include<bits/stdc++.h> using namespace std; string s; string c[6]={"Guanyu","Zhangfei","Caocao","Diaochan","Zhugeliang","Simayi"}; int main(){ int a=0,b; cin>>s; for(int i=0;i<=s.size();i++){
          a+=s[i]; b=a%6; } cout<<c[b]; return 0; }

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

            • -2
              @ 2024-7-21 11:56:19

              #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
              上传者