Class Solution
java.lang.Object
g3701_3800.s3726_remove_zeros_in_decimal_representation.Solution
3726 - Remove Zeros in Decimal Representation.
Easy
You are given a positive integer n.
Return the integer obtained by removing all zeros from the decimal representation of n.
Example 1:
Input: n = 1020030
Output: 123
Explanation:
After removing all zeros from 1**020030** , we get 123.
Example 2:
Input: n = 1
Output: 1
Explanation:
1 has no zero in its decimal representation. Therefore, the answer is 1.
Constraints:
1 <= n <= 1015
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
removeZeros
public long removeZeros(long n)
-