Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114034 成书骏 03字符加密 C++ Compile Error 0 MS 0 KB 319 2025-03-18 22:07:32

Tests(0/0):


Code:

#i#include <iostream> #include <string> using namespace std; int main() { string s; getline(cin, s); const int n = 2; for (char &c : s) if (c >= 'A' && c <= 'Z') c = (c - 'A' + n) % 26 + 'A'; cout << s << endl; return 0; }


Run Info:

Main.cc:1:2: error: invalid preprocessing directive #i
 #i#include 
  ^
Main.cc: In function 'int main()':
Main.cc:7:13: error: 'cin' was not declared in this scope
     getline(cin, s);  
             ^
Main.cc:18:5: error: 'cout' was not declared in this scope
     cout << s << endl;
     ^
Main.cc:18:18: error: 'endl' was not declared in this scope
     cout << s << endl;
                  ^