Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution {
- public static int smallestNumber(int num) {
- int count = 0;
- while (num > 0) {
- num = num / 10;
- count++;
- }
- return (int) Math.pow(10, count - 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement