結果
問題 | No.358 も~っと!門松列 |
ユーザー |
![]() |
提出日時 | 2019-05-21 02:01:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 1,000 ms |
コード長 | 489 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-17 08:42:40 |
合計ジャッジ時間 | 1,673 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
def is_kadomatsu(lst):if len(set(lst)) != 3:return Falsereturn min(lst) == lst[1] or max(lst) == lst[1]lst = list(map(int,input().split()))i = 2cnt = 0t_chain = 0f_chain = 0while True:if is_kadomatsu([x % i for x in lst]):cnt+=1t_chain+=1f_chain = 0else:f_chain+=1t_chain = 0if t_chain >= 1000 or f_chain >= 1000:breaki+=1if t_chain >= 1000:ans = "INF"else:ans = cntprint(ans)