Logic We get 0 when 2 is multiplied by 5 so basic hack is find how many 5's are there in the given number


#1

public class Solution {
public int trailingZeroes(int n)
{
int ans=0;
while(n>=5)
{
ans =ans+n/5;
n=n/5;
}

    return ans;
}

}


#2

Right bro,i thought the sa,e.