제출 #3274

#제출 시각아이디문제언어결과실행 시간메모리
3274The_KMJ_God0 = not cute / 1 = cute (kriii1_0)C++98
컴파일 에러
0 ms0 KiB
#include<stdio.h> int main() { int n,i,tmp,cute=0,not=0; scanf("%d",&n); for ( i=0; i<n; i++ ) { scanf("%d",&tmp); if( tmp==0 ) not++; else cute++; } if ( cute>not ) printf("Junhee is not cute!\n"); else printf("Junhee is cute!\n"); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

0.cpp: In function 'int main()':
0.cpp:4:23: error: expected unqualified-id before 'not' token
0.cpp:9:26: error: expected primary-expression before ';' token
0.cpp:12:18: error: expected primary-expression before ')' token
0.cpp:5:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
0.cpp:8:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]