ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 6bac3cfd-c00d-4c1e-b822-b0c3199d4cde
コード
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for(int i; i = 0; i < str.size()) { if(str.at(i) = "A") { cher 'A' = 'P'; } if(str.at(i) = "P") { cher 'P' = 'C'; } if(str.at(i) = "C") { cher 'C' = 'A'; } } cout << str << "MAN" << endl; }
結果
問題
点数
言語
結果
実行時間
メモリ
D - PACMAN
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:10:24: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 10 | if(str.at(i) = "A") | ^~~ | | | const char* Main.cpp:12:9: error: 'cher' was not declared in this scope; did you mean 'char'? 12 | cher 'A' = 'P'; | ^~~~ | char Main.cpp:14:24: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 14 | if(str.at(i) = "P") | ^~~ | | | const char* Main.cpp:16:9: error: 'cher' was not declared in this scope; did you mean 'char'? 16 | cher 'P' = 'C'; | ^~~~ | char Main.cpp:18:24: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 18 | if(str.at(i) = "C") | ^~~ | | | const char* Main.cpp:20:9: error: 'cher' was not declared in this scope; did you mean 'char'? 20 | cher 'C' = 'A'; | ^~~~ | char