Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. public class Solution {
  2. public static int smallestNumber(int num) {
  3. int count = 0;
  4. while (num > 0) {
  5. num = num / 10;
  6. count++;
  7. }
  8. return (int) Math.pow(10, count - 1);
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement