結果
問題 |
No.116 門松列(1)
|
ユーザー |
![]() |
提出日時 | 2017-02-03 19:29:13 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 96 ms / 5,000 ms |
コード長 | 207 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-25 01:26:07 |
合計ジャッジ時間 | 3,191 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
コンパイルメッセージ
Syntax OK
ソースコード
n=gets.to_i as=gets.split.map &:to_i count=0 (n-2).times do |n| three=[as[n], as[n+1], as[n+2]] second=three.sort[1] next unless second!=three[1] next unless three==three.uniq count+=1 end p count