結果

問題 No.513 宝探し2
ユーザー koba-e964koba-e964
提出日時 2017-05-05 22:50:17
言語 Ruby
(3.3.0)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 11,236 KB
実行使用メモリ 31,580 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 01:05:17
合計ジャッジ時間 2,600 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
30,984 KB
testcase_01 AC 88 ms
30,840 KB
testcase_02 AC 86 ms
31,344 KB
testcase_03 AC 87 ms
30,896 KB
testcase_04 AC 88 ms
30,888 KB
testcase_05 AC 86 ms
31,580 KB
testcase_06 AC 87 ms
31,580 KB
testcase_07 AC 89 ms
31,520 KB
testcase_08 AC 85 ms
30,884 KB
testcase_09 AC 85 ms
31,076 KB
testcase_10 AC 90 ms
30,884 KB
testcase_11 AC 90 ms
30,960 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