C 4ms


  • 0
    D
    int trailingZeroes(int n)
    {
        long five=5,sum=0;
    
        while(n/five)
        {
    
            sum+=n/five;
            five=five*5;
    
        }
        return sum;
        
    }
    
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.