Tranvick

Untitled

Jan 10th, 2012
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.15 KB | None | 0 0
  1. #include <cstdio>
  2. int main(){
  3.     int x,l=0;scanf("%d",&x);
  4.     for(;x>=(1<<l);l++) x-=1<<l;
  5.     for(int j=l-1;j>=0;j--) printf("%d",(x&(1<<j))?7:4);
  6.     return 0;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment