結果

問題 No.514 宝探し3
ユーザー koba-e964koba-e964
提出日時 2020-02-21 23:38:41
言語 Ruby
(3.2.2)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 11,216 KB
実行使用メモリ 31,292 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-23 19:43:13
合計ジャッジ時間 2,478 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
31,176 KB
testcase_01 AC 95 ms
31,012 KB
testcase_02 AC 99 ms
31,292 KB
testcase_03 AC 95 ms
30,932 KB
testcase_04 AC 95 ms
30,548 KB
testcase_05 AC 96 ms
30,640 KB
testcase_06 AC 96 ms
30,836 KB
testcase_07 AC 92 ms
31,260 KB
testcase_08 AC 94 ms
30,764 KB
testcase_09 AC 94 ms
30,836 KB
testcase_10 AC 93 ms
31,136 KB
testcase_11 AC 93 ms
31,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

M = 10 ** 9 + 1
puts "0 0"
STDOUT.flush
d1 = gets.to_i
puts M.to_s + " 0"
STDOUT.flush
d2 = gets.to_i
x = (d1 - d2 + M) / 2
y = d1 - x
puts "#{x} #{y}"
STDOUT.flush
gets
0