結果

問題 No.514 宝探し3
ユーザー むらためむらため
提出日時 2019-01-19 12:15:49
言語 Nim
(2.0.2)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 412 bytes
コンパイル時間 2,132 ms
コンパイル使用メモリ 66,420 KB
実行使用メモリ 24,240 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-23 16:43:30
合計ジャッジ時間 3,412 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,060 KB
testcase_01 AC 23 ms
23,376 KB
testcase_02 AC 22 ms
23,796 KB
testcase_03 AC 23 ms
23,844 KB
testcase_04 AC 23 ms
24,024 KB
testcase_05 AC 23 ms
23,364 KB
testcase_06 AC 25 ms
23,988 KB
testcase_07 AC 23 ms
24,240 KB
testcase_08 AC 24 ms
23,532 KB
testcase_09 AC 23 ms
23,340 KB
testcase_10 AC 24 ms
24,156 KB
testcase_11 AC 22 ms
23,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# [0,100000]
proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}
proc scan(): int =
  while true:
    var k = getchar_unlocked()
    if k < '0': break
    result = 10 * result + k.ord - '0'.ord

const INF = 1000000000
echo 0," ",0
let a = scan()
if a == 0 : quit 0
echo 0," ",INF
let b = scan()
if b == 0 : quit 0
let x = (a + b - INF) div 2
let y = (a - b + INF) div 2
echo x," ",y
0