結果
問題 |
No.1666 累乗数
|
ユーザー |
![]() |
提出日時 | 2021-09-03 22:03:43 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 500 bytes |
コンパイル時間 | 417 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 77,056 KB |
最終ジャッジ日時 | 2024-12-15 13:28:04 |
合計ジャッジ時間 | 14,176 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 19 |
ソースコード
import sys input=sys.stdin.readline #文字列入力はするな!! from math import log def f(x): if x==0:return 0 res=1 for b in range(2,64): a=int(x**(1/b)) while (a+1)**b<=x: a+=1 while a**b>x:a-=1 if a>=2:res+=a-1 if x>=16:res-=1 return res T=int(input()) for _ in range(T): k=int(input()) ok=10**18+100 ng=0 while ok-ng>1: mid=(ok+ng)//2 if f(mid)>=k:ok=mid else:ng=mid print(ok)