Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solution(N) {
- var enable_print = N % 10;
- while (N > 0) {
- if (enable_print == 0 && N % 10 != 0) {
- enable_print = 1;
- }
- else if (enable_print == 1) {
- process.stdout.write((N % 10).toString());
- }
- N = Math.floor(N / 10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement