ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 429ee339-4d1b-47aa-9477-2203e9875986
コード
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for(int i; i = 0; i < str.size(); i++) { if(str.at(i) == "A") { str.at(i) = "P"; } if(str.at(i) == "P") { str.at(i) = "C"; } if(str.at(i) == "C") { str.at(i) = "A"; } } cout << str << "MAN" << endl; }
結果
問題
点数
言語
結果
実行時間
メモリ
D - PACMAN
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:8:37: error: expected ')' before ';' token 8 | for(int i; i = 0; i < str.size(); i++) | ~ ^ | ) Main.cpp:8:39: error: 'i' was not declared in this scope 8 | for(int i; i = 0; i < str.size(); i++) | ^