SHARE
TWEET

Untitled

a guest Mar 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top