結果
| 問題 |
No.1312 Snake Eyes
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-09 00:14:43 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 209 bytes |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-18 22:03:15 |
| 合計ジャッジ時間 | 41,159 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 WA * 48 TLE * 7 |
ソースコード
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)