結果

問題 No.513 宝探し2
ユーザー むらためむらため
提出日時 2019-01-19 12:13:20
言語 Nim
(2.0.2)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 2,175 ms
コンパイル使用メモリ 66,456 KB
実行使用メモリ 24,228 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-24 02:05:33
合計ジャッジ時間 3,552 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,604 KB
testcase_01 AC 26 ms
23,376 KB
testcase_02 AC 26 ms
24,216 KB
testcase_03 AC 26 ms
23,388 KB
testcase_04 AC 26 ms
24,228 KB
testcase_05 AC 26 ms
23,988 KB
testcase_06 AC 26 ms
23,352 KB
testcase_07 AC 26 ms
23,364 KB
testcase_08 AC 25 ms
23,640 KB
testcase_09 AC 26 ms
23,628 KB
testcase_10 AC 25 ms
23,640 KB
testcase_11 AC 26 ms
24,012 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 = 100000
echo 0," ",0
let a = scan()
if a == 0 : quit 0
echo INF," ",0
let b = scan()
if b == 0 : quit 0
let x = (a + b - INF) div 2
let y = (a - b + INF) div 2
echo y," ",x
0