2 条题解

  • 2
    @ 2025-7-15 17:12:47

    #include <bits/stdc++.h> using namespace std; string b, c;

    int main() { char s; getline(cin, b); c = ""; for (int i = 0; i < b.size(); i++) { s = b[i]; if ((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z')) { s++; if ((s > 'Z' && s < 'a') || (s > 'z')) { s = s - 26; } } c = c + s; } cout << c;

    return 0;
    

    }

    • 1
      @ 2025-7-15 17:13:19

      #include <bits/stdc++.h> using namespace std; string b, c;

      int main() { char s; getline(cin, b); c = ""; for (int i = 0; i < b.size(); i++) { s = b[i]; if ((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z')) { s++; if ((s > 'Z' && s < 'a') || (s > 'z')) { s = s - 26; } } c = c + s; } cout << c; return 0; }

      • 1

      信息

      ID
      455
      时间
      1000ms
      内存
      64MiB
      难度
      6
      标签
      递交数
      26
      已通过
      12
      上传者