結果
問題 | No.1666 累乗数 |
ユーザー |
![]() |
提出日時 | 2021-09-03 23:12:44 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 8,347 ms |
コンパイル使用メモリ | 217,768 KB |
実行使用メモリ | 8,704 KB |
最終ジャッジ日時 | 2024-07-05 15:26:27 |
合計ジャッジ時間 | 11,608 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 |
ソースコード
int moe[64];ll g(ll p,ll m){ll x=pow(m,1./p);while((__int128_t)x**p>m){--x;}while((__int128_t)(x+1)**p<=m){++x;}return x-1;}ll f(ll k){ll lo=0,hi=1d18;while(lo+1<hi){ll m=lo+hi>>1;ll c=1;rep(p,2,64){c+=g(p,m)*moe[p];}if(c<k){lo=m;}else{hi=m;}}return hi;}{rep(i,2,64){moe[i]=-Moebius(i);}ll@t;rep(t){ll@k;wt(f(k));}}