結果

問題 No.920 あかあお
ユーザー shi-moshi-mo
提出日時 2020-09-30 03:46:41
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 146 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 11,296 KB
実行使用メモリ 15,308 KB
最終ジャッジ日時 2023-09-18 08:30:41
合計ジャッジ時間 3,100 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,012 KB
testcase_01 AC 79 ms
15,308 KB
testcase_02 AC 80 ms
15,052 KB
testcase_03 AC 80 ms
15,036 KB
testcase_04 AC 79 ms
15,244 KB
testcase_05 AC 80 ms
15,268 KB
testcase_06 AC 80 ms
14,956 KB
testcase_07 AC 80 ms
15,108 KB
testcase_08 AC 81 ms
15,268 KB
testcase_09 AC 80 ms
15,104 KB
testcase_10 AC 81 ms
15,132 KB
testcase_11 AC 81 ms
15,268 KB
testcase_12 AC 81 ms
15,200 KB
testcase_13 AC 81 ms
15,220 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x, y, z = gets.split.map(&:to_i)
x, y = [x, y].sort
if 0 < z && x != y
  t = [(y - x), z].min
  x += t
  z -= t
end
if 0 < z
  x += z/2
end
puts x
0