結果

問題 No.1176 少ない質問
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-06-14 09:20:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,272 KB
実行使用メモリ 54,308 KB
最終ジャッジ日時 2024-12-24 04:28:43
合計ジャッジ時間 2,087 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

"""
n択問題m問なので、m**n通り
答えはmin(nm|a<m**n)
2<=a<=10**18 ~ 2**60
->答えは最大でも120
"""
a=int(input())
ans=120
for x in range(2,120):
  st=set()
  for y in range(1,int(x**0.5)+1):
    if x%y==0:
      st.add((x//y,y))
  for u,v in st:
    if a<pow(u,v):
      ans=min(ans,u*v)
    if a<pow(v,u):
      ans=min(ans,u*v)
print(ans)
0