結果
| 問題 |
No.1666 累乗数
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2021-09-03 14:35:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 666 ms / 2,000 ms |
| コード長 | 275 bytes |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 81,940 KB |
| 実行使用メモリ | 77,408 KB |
| 最終ジャッジ日時 | 2024-12-15 09:05:42 |
| 合計ジャッジ時間 | 13,531 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 19 |
ソースコード
for _ in range(int(input())):
k,n,o=int(input()),0,2**63
while o-n>1:
m,c=(o+n)//2,[0]*60
for i in range(59,1,-1):
N,O=int(2**(63/i))+1,0
while N-O>1:
M=(N+O)//2
if M**i<=m:O=M
else:N=M
c[i]=O-1-sum(c[::i])
if sum(c)+1>=k:o=m
else:n=m
print(o)
とりゐ