結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2016-04-13 23:56:49 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 5,000 ms |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 269 ms |
| コンパイル使用メモリ | 77,124 KB |
| 最終ジャッジ日時 | 2025-12-03 20:15:02 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
n=input() a=map(int,raw_input().split()) c=0 for i in range(n-2): k=a[i:i+3] m=sorted(k)[1] if k[0]!=k[1] and k[0]!=k[2] and k[1]!=k[2] and(k[0]==m or k[2]==m): c+=1 #print k print c
taba