ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 5604c499-7b24-458e-8480-d2946d24fe14
コード
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A') { s.at(i) = 'P'; } else if(s.at(i) == 'C') { s.at(i) = 'A'; } else if(s.at(i) == 'P') { s.at(i) = 'C'; } } cout << s + "MAN" << endl; }
結果
問題
点数
言語
結果
実行時間
メモリ
D - PACMAN
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:8:23: error: 's' was not declared in this scope 8 | for (int i = 0; i < s.size(); i++) { | ^ Main.cpp:20:11: error: 's' was not declared in this scope 20 | cout << s + "MAN" << endl; | ^