실행 실패 (제출 코드 컴파일 에러)
Main.c: In function ‘print’: Main.c:15:16: error: invalid operands to binary >> (have ‘unsigned char *’ and ‘int’) 15 | if(nums>>i & 1) | ^~ Main.c:16:22: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=] 16 | printf("%d\n"); | ~^ | | | int Main.c:18:16: error: invalid operands to binary >> (have ‘unsigned char *’ and ‘int’) 18 | if(nums>>i & 1) | ^~ Main.c:19:22: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=] 19 | printf("%d\n"); | ~^ | | | int Main.c: In function ‘main’: Main.c:24:34: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration] 24 | unsigned char* nums = (char*)malloc(125001); | ^~~~~~ Main.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | Main.c:24:34: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 24 | unsigned char* nums = (char*)malloc(125001); | ^~~~~~ Main.c:24:34: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ Main.c:24:27: warning: pointer targets in initialization of ‘unsigned char *’ from ‘char *’ differ in signedness [-Wpointer-sign] 24 | unsigned char* nums = (char*)malloc(125001); | ^ Main.c:25:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | scanf("%d",&N); | ^~~~~~~~~~~~~~ Main.c:27:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 27 | scanf("%d",&n); | ^~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.