실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:13:25: error: invalid cast from type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to type ‘size_t’ {aka ‘long unsigned int’} 13 | for (int j = 0; j < size_t(num) - 2; j++) { | ^~~~~~~~~~~ Main.cpp:14:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 14 | for (int k = 0; k < num.length() - 1; k++) { | ~~^~~~~~~~~~~~~~~~~~ Main.cpp:15:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 15 | for (int l = 0; l < num.length(); l++) { | ~~^~~~~~~~~~~~~~ Main.cpp:16:22: warning: comparison with string literal results in unspecified behavior [-Waddress] 16 | if (num[j] == "6" && num[k] == 6 && num[l] == "6") { Main.cpp:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cpp:16:54: warning: comparison with string literal results in unspecified behavior [-Waddress] 16 | if (num[j] == "6" && num[k] == 6 && num[l] == "6") { Main.cpp:16:54: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.