Skip to main content
2 of 4
deleted 3 characters in body
fR0DDY
  • 4.6k
  • 26
  • 37

C 84 81 Characters

main(v,r,x){for(scanf("%d",&v),x=v,r=0;v;r*=2,r|=v&1,v/=2);puts(r-x?"NO":"YES");}

It does not use any function like string reverse.

fR0DDY
  • 4.6k
  • 26
  • 37