ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 245df8f7-b003-4386-9c39-6b03ebf59cf7
コード
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < s.size(); i++) { if (str.at(i) == 'A') { s.at(i) = 'P'; // char型の'M' } if (str.at(i) == 'P') { s.at(i) = 'c'; // char型の'M' } if (str.at(i) == 'C') { s.at(i) = 'A'; // char型の'M' } cout << s << "MAN"<< endl; // Mello }
結果
問題
点数
言語
結果
実行時間
メモリ
D - PACMAN
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:8:15: error: 'str' was not declared in this scope; did you mean 'std'? 8 | if (str.at(i) == 'A') { | ^~~ | std Main.cpp:11:12: error: 'str' was not declared in this scope; did you mean 'std'? 11 | if (str.at(i) == 'P') { | ^~~ | std Main.cpp:14:12: error: 'str' was not declared in this scope; did you mean 'std'? 14 | if (str.at(i) == 'C') { | ^~~ | std Main.cpp:18:2: error: expected '}' at end of input 18 | } | ^ Main.cpp:4:12: note: to match this '{' 4 | int main() { | ^