結果
問題 |
No.358 も~っと!門松列
|
ユーザー |
![]() |
提出日時 | 2016-12-06 08:29:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 242 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-11-28 01:37:40 |
合計ジャッジ時間 | 1,758 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 10 |
ソースコード
is_kadomatsu = lambda x: (max(x) == x[1] or min(x) == x[1]) and not is_zero(x) is_zero = lambda x: x[0] == x[-1] an = list(map(int, input().split())) if is_zero(an): print(0) elif is_kadomatsu(an): print('INF') else: cnt = 0 for b in [list(map(lambda y: y % i, an)) for i in range(2, max(an) + 1)]: # print(b) if is_kadomatsu(b): cnt += 1 print(cnt)