結果

問題 No.48 ロボットの操縦
ユーザー MiyamonYMiyamonY
提出日時 2019-09-06 14:44:48
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 15,980 KB
最終ジャッジ日時 2023-09-06 03:11:06
合計ジャッジ時間 2,436 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 31 ms
13,764 KB
testcase_02 AC 30 ms
13,804 KB
testcase_03 AC 30 ms
13,796 KB
testcase_04 AC 30 ms
13,776 KB
testcase_05 AC 32 ms
13,732 KB
testcase_06 AC 31 ms
13,792 KB
testcase_07 AC 30 ms
13,760 KB
testcase_08 AC 31 ms
13,884 KB
testcase_09 AC 30 ms
13,716 KB
testcase_10 AC 30 ms
13,728 KB
testcase_11 AC 31 ms
13,788 KB
testcase_12 AC 31 ms
13,860 KB
testcase_13 AC 31 ms
13,776 KB
testcase_14 AC 30 ms
13,720 KB
testcase_15 AC 30 ms
13,736 KB
testcase_16 AC 30 ms
13,724 KB
testcase_17 AC 31 ms
13,924 KB
testcase_18 AC 31 ms
13,892 KB
testcase_19 AC 31 ms
13,888 KB
testcase_20 AC 30 ms
13,892 KB
testcase_21 AC 31 ms
13,796 KB
testcase_22 AC 31 ms
13,924 KB
testcase_23 AC 30 ms
13,792 KB
testcase_24 AC 30 ms
13,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (read-number)
  (string->number (read-line)))

(let* ((x (read-number))
       (y (read-number))
       (l (read-number)))

  (print (+ #?=(div (+ (- l 1) (abs x)) l)
	    #?=(div (+ (- l 1) (abs y)) l)
	    #?=(cond ((and (= x 0) (= y 0)) 0)
		     ((>= y 0) 1)
 		     (else 2)))))
0