結果

問題 No.513 宝探し2
ユーザー むらためむらため
提出日時 2019-01-19 12:08:44
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 2,147 ms
コンパイル使用メモリ 65,924 KB
実行使用メモリ 24,348 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-23 16:43:27
合計ジャッジ時間 5,006 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 25 ms
24,312 KB
testcase_08 AC 23 ms
24,348 KB
testcase_09 AC 24 ms
23,496 KB
testcase_10 AC 25 ms
23,664 KB
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

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 x," ",y
0