結果

問題 No.1176 少ない質問
ユーザー Navier_Boltzmann
提出日時 2022-09-10 02:21:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-26 03:13:25
合計ジャッジ時間 1,541 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
import math,sys
input = sys.stdin.readline

A = int(input())

ans = 2*(len(bin(A))-2)
L = 2*(len(bin(A))-2)
for i in range(2,L+1):
    
    cnt = 1
    while pow(i,cnt)<=A:
        cnt += 1
    ans = min(ans,i*(cnt))
print(ans)
0