Given an integer n , return n ! The number of zeros in the mantissa of the result.
1 class Solution { 2 public: 3 int trailingZeroes(int n) { 4 int count = 0; 5 while(n>0){ 6 count+=n/5; 7 n/=5; 8 } 9 return count; 10 } 11 };
Given an integer n , return n ! The number of zeros in the mantissa of the result.
1 class Solution { 2 public: 3 int trailingZeroes(int n) { 4 int count = 0; 5 while(n>0){ 6 count+=n/5; 7 n/=5; 8 } 9 return count; 10 } 11 };