fork download
  1. void stepen(int N)
  2. {
  3. int c;
  4. c=N%2;
  5. if (c!=0)
  6. {
  7. printf("NO");
  8. return;
  9. }
  10. if (N==1)
  11. {
  12. printf("YES");
  13. return;
  14. }
  15.  
  16. stepen(N/2);
  17. }
  18.  
  19. int main(void) {
  20. int N;
  21. scanf("%d",&N);
  22. stepen(N);
  23. return 0;
  24. }
Success #stdin #stdout 0s 5504KB
stdin
Standard input is empty
stdout
NO