結果
| 問題 | 
                            No.1312 Snake Eyes
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-12-09 00:16:23 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 193 bytes | 
| コンパイル時間 | 204 ms | 
| コンパイル使用メモリ | 81,952 KB | 
| 実行使用メモリ | 83,252 KB | 
| 最終ジャッジ日時 | 2024-09-18 22:04:57 | 
| 合計ジャッジ時間 | 5,745 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 34 WA * 2 TLE * 1 -- * 48 | 
ソースコード
from math import log, nan
n = int(input())
for p in range(2, n):
    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)