結果

問題 No.84 悪の算盤
ユーザー simansiman
提出日時 2015-01-10 21:37:25
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 11,572 KB
実行使用メモリ 15,284 KB
最終ジャッジ日時 2023-09-03 22:57:34
合計ジャッジ時間 2,114 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
15,092 KB
testcase_01 AC 80 ms
15,136 KB
testcase_02 AC 81 ms
15,048 KB
testcase_03 AC 81 ms
15,256 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 82 ms
15,044 KB
testcase_08 AC 82 ms
15,132 KB
testcase_09 AC 82 ms
15,256 KB
testcase_10 AC 82 ms
15,124 KB
testcase_11 AC 82 ms
15,100 KB
testcase_12 AC 83 ms
15,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class A
  def initialize
    r, c = gets.chomp.split(' ').map(&:to_i)

    if c.even?
      puts (r * (c/2)) - 1
    else
      puts (r * (c/2) + (r/2.0).ceil) - 1
    end
  end
end

A.new
0