[SWEA] 8993 하지추측

Time Lapse :NONE

8993.c

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>

main(void){
long long N;
register int tc = 0; int T;
scanf("%d", &T);
while(T--){
scanf("%lld",&N);
while(!(N%2)) N>>=1;
printf("#%d ",++tc);
N!=1 ? printf("NO\n") : printf("YES\n");
}
}
Author: Song Hayoung
Link: https://songhayoung.github.io/2020/08/04/PS/SWEA/8993/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.