結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-22 21:42:49 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 5,000 ms |
| コード長 | 236 bytes |
| 記録 | |
| コンパイル時間 | 523 ms |
| コンパイル使用メモリ | 85,300 KB |
| 実行使用メモリ | 53,596 KB |
| 最終ジャッジ日時 | 2026-04-09 22:54:30 |
| 合計ジャッジ時間 | 2,483 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
N = int(input())
ans = 0
A = list(map(int, input().split()))
for i in range(N - 2):
a, b, c = A[i: i + 3]
if a == b or b == c or c == a:
continue
if b == min(a, b, c) or b == max(a, b, c):
ans += 1
print(ans)