#include using namespace std; #define ALL(x) (x).begin(), (x).end() #define REP(i,n) for(int i=0; ib ? a=b, true : false; } using ll=long long; const int INF=1e9+10; const ll INFL=4e18; #ifdef DEBUG #include "./debug.hpp" #else #define debug(...) #define print_line #endif /// @brief 素数列挙 /// @details n 以下の素数の配列を返す /// @note O(n log(log(n))) vector PrimeEnumerate(int n) { vector prime, is_prime(n+1,true); is_prime[0]=is_prime[1]=false; for(int i=2; i<=n; i++) { if(is_prime[i]) { prime.push_back(i); for(int j=2*i; j<=n; j+=i) is_prime[j]=false; } } return prime; } //---------------------------------------------------------- void solve() { ll N; cin>>N; const int mx=2e5; auto pr=PrimeEnumerate(mx); ll ans=0; for(ll p: pr) { ll cur=p*p; while(cur<=N) { ans+=cur; cur*=p; } } cout<>T; while(T--) solve(); }