結果

問題 No.514 宝探し3
ユーザー maimai
提出日時 2017-05-06 01:06:12
言語 Ruby
(3.3.0)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 11,536 KB
実行使用メモリ 31,480 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-23 13:53:15
合計ジャッジ時間 2,723 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
31,372 KB
testcase_01 AC 96 ms
31,240 KB
testcase_02 AC 95 ms
30,932 KB
testcase_03 AC 94 ms
30,864 KB
testcase_04 AC 99 ms
31,028 KB
testcase_05 AC 95 ms
30,856 KB
testcase_06 AC 95 ms
31,096 KB
testcase_07 AC 97 ms
30,880 KB
testcase_08 AC 96 ms
30,740 KB
testcase_09 AC 94 ms
30,908 KB
testcase_10 AC 94 ms
31,052 KB
testcase_11 AC 96 ms
31,480 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def query(x,y)
    puts "#{x} #{y}"
    STDOUT.flush
    return gets.to_i
end

N = 1000000000

p1 = query(0,0)
exit if p1 == 0
p2 = query(N,0)
exit if p2 == 0
print "#{(p1-p2+N)/2} #{(p1+p2-N)/2}"
0