結果
問題 | No.116 門松列(1) |
ユーザー |
![]() |
提出日時 | 2017-06-13 13:10:34 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 11 ms / 5,000 ms |
コード長 | 230 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-06-25 01:28:42 |
合計ジャッジ時間 | 1,178 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
n = int(raw_input())l = map(int, raw_input().split())c = 0for i in range(n-2):x = l[i]y = l[i+1]z = l[i+2]if x != y and y != z and z != x and (min((x,y,z)) == y or max((x,y,z)) == y):c += 1print c