結果

問題 No.306 さいたま2008
ユーザー yozayoza
提出日時 2015-11-27 23:27:51
言語 Ruby
(3.2.2)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,224 KB
実行使用メモリ 15,344 KB
最終ジャッジ日時 2023-10-12 00:50:21
合計ジャッジ時間 2,753 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
15,132 KB
testcase_01 AC 74 ms
15,036 KB
testcase_02 AC 75 ms
15,248 KB
testcase_03 AC 74 ms
15,140 KB
testcase_04 AC 74 ms
15,068 KB
testcase_05 AC 74 ms
15,140 KB
testcase_06 AC 78 ms
15,032 KB
testcase_07 AC 75 ms
15,156 KB
testcase_08 AC 77 ms
15,288 KB
testcase_09 AC 76 ms
15,024 KB
testcase_10 AC 76 ms
15,080 KB
testcase_11 AC 76 ms
15,336 KB
testcase_12 AC 75 ms
15,024 KB
testcase_13 AC 75 ms
15,124 KB
testcase_14 AC 76 ms
15,244 KB
testcase_15 AC 75 ms
15,172 KB
testcase_16 AC 75 ms
15,164 KB
testcase_17 AC 75 ms
15,284 KB
testcase_18 AC 75 ms
15,344 KB
testcase_19 AC 75 ms
15,264 KB
testcase_20 AC 75 ms
15,132 KB
testcase_21 AC 75 ms
15,228 KB
testcase_22 AC 77 ms
15,336 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

xa, ya = gets.chomp.split.map(&:to_i)
xb, yb = gets.chomp.split.map(&:to_i)

if ya == yb
  puts ya
elsif ya > yb
  puts yb + xb * 1.0 * (ya - yb) / (xa + xb)
else
  puts ya + xa * 1.0 * (yb - ya) / (xa + xb)
end
0