返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. string str;
  4. int as;
  5. int main()
  6. {
  7.     for(int i=0;i<3;i++)
  8.     {
  9.         getline(cin,str);
  10.         as=(((str[0]-'0')+(str[2]-'0')+(str[4]-'0'))+((str[1]-'0')+(str[3]-'0'))*5)%26;
  11.     if(str[5]-64==as)//((s0+s2+s4)+(s1+s3)*5)%26
  12.         cout<<"Pass"<<endl;
  13.     else
  14.         cout<<"Fail"<<endl;

  15.     }



  16.     return 0;
  17. }
複製代碼

TOP

返回列表