結果
問題 |
No.116 門松列(1)
|
ユーザー |
|
提出日時 | 2021-06-15 16:36:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 216 bytes |
コンパイル時間 | 212 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-26 19:45:49 |
合計ジャッジ時間 | 2,150 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 13 WA * 8 |
ソースコード
N = int(input()) A = [int(i) for i in input().split()] res = 0 for i in range(N-2): l = A[i:i+3] l_s = sorted(l) if (l[0] == l_s[1] or l[2] == l_s[1]) and l[0] != l[1] != l[2]: res += 1 print(res)