結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 24 ms
23,772 KB
testcase_08 AC 24 ms
23,364 KB
testcase_09 AC 23 ms
24,156 KB
testcase_10 AC 23 ms
24,324 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 = 1000000000
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