trailing zeroes in factorial
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin>>t; while(t--) { int n; cin>>n; int res=0; for(int i=5;i<=n;i=i*5) { res=res+n/i; } cout<<res<<endl; } return 0; }