실행 실패 (제출 코드 컴파일 에러)
Main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<ios> | ^~~~~~ Main.cpp:2:13: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 2 | char s[101];main(int n){for(scanf("%d",&n);n--;scanf("%s",s));printf("%c%c ",*s,s[strlen(s)-1]);} | ^~~~ Main.cpp:2:13: warning: ‘int main(int)’ takes only zero or two arguments [-Wmain] Main.cpp: In function ‘int main(int)’: Main.cpp:2:83: error: ‘strlen’ was not declared in this scope 2 | char s[101];main(int n){for(scanf("%d",&n);n--;scanf("%s",s));printf("%c%c ",*s,s[strlen(s)-1]);} | ^~~~~~ Main.cpp:2:1: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’? 1 | #import<ios> +++ |+#include <cstring> 2 | char s[101];main(int n){for(scanf("%d",&n);n--;scanf("%s",s));printf("%c%c ",*s,s[strlen(s)-1]);} Main.cpp:2:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 2 | char s[101];main(int n){for(scanf("%d",&n);n--;scanf("%s",s));printf("%c%c ",*s,s[strlen(s)-1]);} | ~~~~~^~~~~~~~~ Main.cpp:2:53: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 2 | char s[101];main(int n){for(scanf("%d",&n);n--;scanf("%s",s));printf("%c%c ",*s,s[strlen(s)-1]);} | ~~~~~^~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.