結果

問題 No.1312 Snake Eyes
ユーザー NatsubiSogan
提出日時 2020-12-09 00:15:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 76,672 KB
最終ジャッジ日時 2024-09-18 22:03:31
合計ジャッジ時間 9,465 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33 WA * 52
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log, nan


n = int(input())
for p in range(2, int(n ** 0.5) + 1):
    l = [(n // pow(p, i)) % p for i in range(int(log(n, p)) + 1)]
    if len(set(l)) == 1:
        exit(print(p))
print(n - 1)
0