#include <stdio.h> int main(int argc, char **argv) { char buf[80]; while(fgets(buf, 80, stdin)!= NULL) { (atoi(buf) << 31)?printf("홀수\n"):printf("짝수\n"); } }
#include <stdio.h> int main(int argc, char **argv) { char buf[80]; while(fgets(buf, 80, stdin)!= NULL) { (atoi(buf)&1)?printf("홀수\n"):printf("짝수\n"); } }
Copyrights © - Joinc, All Rights Reserved. Inherited From - Yundream Rebranded By - Joonphil
비트연산으로 홀짝 검사하기
쉬프트 연산 버전
& 연산 버전
Recent Posts
Archive Posts
Tags