Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function solution(N) {
  2.           var enable_print = N % 10;
  3.           while (N > 0) {
  4.             if (enable_print == 0 && N % 10 != 0) {
  5.               enable_print = 1;
  6.             }
  7.             else if (enable_print == 1) {
  8.               process.stdout.write((N % 10).toString());
  9.             }
  10.             N = Math.floor(N / 10);
  11.           }
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement