結果

問題 No.1312 Snake Eyes
ユーザー googol_S0
提出日時 2020-12-09 00:12:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 76,216 KB
最終ジャッジ日時 2024-09-18 21:58:52
合計ジャッジ時間 10,268 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 81 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
for i in range(2,int(N**0.5)+1):
  M=N
  P=[]
  while M:
    P.append(M%i)
    M//=i
  if len(set(P))==1:
    print(i)
    exit()
P=N
for i in range(1,int(N**0.5)+1):
  if N%i==0 and i*i<N:
    P=min(P,(N//i)-1)
print(P)
0