Damn, just focus on num, num/5 + num/5/5 … will give multiple of 5 from 1 to num inclusively,
Here is little snippet
while(num!=0){
cnt+=num/5;
num/=5;
}
Here cnt is variable.
P.S. don’t make habit of defining count as variable
If still you find it hard read editorial, it will explain more briefly
1 Like