結果
問題 | No.116 門松列(1) |
ユーザー |
![]() |
提出日時 | 2016-04-13 23:56:49 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 5,000 ms |
コード長 | 189 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-25 01:16:49 |
合計ジャッジ時間 | 1,427 ms |
ジャッジサーバーID (参考情報) |
judge1 / 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