結果
問題 | No.1312 Snake Eyes |
ユーザー |
|
提出日時 | 2020-12-13 19:41:25 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 81,944 KB |
実行使用メモリ | 82,504 KB |
最終ジャッジ日時 | 2024-09-19 23:50:15 |
合計ジャッジ時間 | 11,468 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 TLE * 2 -- * 40 |
ソースコード
import sys def input(): return sys.stdin.readline().strip() def mapint(): return list(map(int, input().split())) sys.setrecursionlimit(10**9) N = int(input()) cnt = 2 while True: base = N lis = [] while base>0: if lis and base%cnt!=lis[-1]: break lis.append(base%cnt) base //= cnt if base==0: print(cnt) exit() cnt += 1