실행 실패 (제출 코드 컴파일 에러)
Main.cpp:10:5: error: ‘int time’ redeclared as different kind of entity 10 | int time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h:35, from /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h:148, from /usr/include/c++/11/ext/atomicity.h:35, from /usr/include/c++/11/bits/ios_base.h:39, from /usr/include/c++/11/streambuf:41, from /usr/include/c++/11/bits/streambuf_iterator.h:35, from /usr/include/c++/11/iterator:66, from /usr/include/c++/11/bits/ranges_algobase.h:36, from /usr/include/c++/11/bits/ranges_algo.h:35, from /usr/include/c++/11/algorithm:64, from Main.cpp:4: /usr/include/time.h:76:15: note: previous declaration ‘time_t time(time_t*)’ 76 | extern time_t time (time_t *__timer) __THROW; | ^~~~ Main.cpp: In function ‘int main()’: Main.cpp:41:23: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t (*)(time_t*) noexcept’ {aka ‘long int (*)(long int*) noexcept’} [-Wformat=] 41 | else printf("%d",time); | ~^ ~~~~ | | | | | time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept} | int Main.cpp: In function ‘void solve()’: Main.cpp:60:21: error: assignment of function ‘time_t time(time_t*)’ 60 | time=now.cnt; | ~~~~^~~~~~~~ Main.cpp: In function ‘int main()’: Main.cpp:19:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | scanf("%d%d",&m,&n); | ~~~~~^~~~~~~~~~~~~~ Main.cpp:23:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 23 | scanf("%d",&a); | ~~~~~^~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.