結果
| 問題 |
No.116 門松列(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-24 15:37:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 241 bytes |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-07 00:12:17 |
| 合計ジャッジ時間 | 1,881 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 21 |
ソースコード
a = list(map(int, input().split()))
cnt = 0
for i in range(n-2):
if a[i] == a[i+1] or a[i+1] == a[i+2] or a[i] == a[i+2]:
continue
if a[i] < a[i+1] < a[i+2] or a[i] > a[i+1] > a[i+2]:
continue
cnt += 1
print(cnt)