結果
| 問題 |
No.116 門松列(1)
|
| ユーザー |
|
| 提出日時 | 2023-06-05 12:16:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 233 bytes |
| コンパイル時間 | 219 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-29 06:00:33 |
| 合計ジャッジ時間 | 1,943 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 11 WA * 10 |
ソースコード
def iskadomatsu(S):
return S.index(max(S)) == 1 or S.index(min(S)) == 1
N = int(input())
A = list(map(int, input().split()))
Count = 0
for i in range(N - 2):
if iskadomatsu([A[i], A[i + 1], A[i + 2]]):
Count += 1
print(Count)