結果

問題 No.514 宝探し3
ユーザー simansiman
提出日時 2020-12-11 17:35:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 11,436 KB
実行使用メモリ 31,504 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 09:23:41
合計ジャッジ時間 2,576 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
31,284 KB
testcase_01 AC 108 ms
31,268 KB
testcase_02 AC 107 ms
31,504 KB
testcase_03 AC 107 ms
30,876 KB
testcase_04 AC 106 ms
30,988 KB
testcase_05 AC 107 ms
31,348 KB
testcase_06 AC 107 ms
31,240 KB
testcase_07 AC 106 ms
31,296 KB
testcase_08 AC 107 ms
31,072 KB
testcase_09 AC 108 ms
31,140 KB
testcase_10 AC 106 ms
30,828 KB
testcase_11 AC 107 ms
30,904 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def query(x, y)
  STDOUT.puts("%d %d" % [x, y])
  STDOUT.flush
  gets.to_i
end

d1 = query(0, 0)
d2 = query(0, 1_000_000_000)

x = (d1 + d2 - 1_000_000_000) / 2
y = (d1 - x)
query(x, y)
0