結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2015-01-10 19:12:12 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 143 ms / 5,000 ms |
コード長 | 179 bytes |
コンパイル時間 | 443 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 20,480 KB |
最終ジャッジ日時 | 2024-06-13 03:34:53 |
合計ジャッジ時間 | 1,617 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
class A def initialize n = gets.chomp.to_i x = gets.chomp.split(' ').map(&:to_i) puts x.count - 2 * [x.count{|i| i.even?}, x.count{|i| i.odd?}].min end end A.new