Uva 11415 - Count the Factorials
#include<bits/stdc++.h> #define sze 10000010 #define out(s) cout << s << "\n" #define outs(s) cout << s << " " using namespace std; typedef long long LL; bitset<sze+9>bs; LL nod[sze+9], p = sze+9; void sieve() { LL i,j; bs.set(); bs[0] = bs[1] = 0; nod[1] = 0; for(i=2; i<=p; i++) { if(bs[i]) { nod[i] = 1; for(j=2*i; j<=p; j+=i) { nod[j] = 1 + nod[j / i]; bs[j] = 0; ...