結果

問題 No.48 ロボットの操縦
ユーザー MiyamonYMiyamonY
提出日時 2019-09-06 14:47:09
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 13,948 KB
最終ジャッジ日時 2023-09-06 03:14:33
合計ジャッジ時間 2,352 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
13,828 KB
testcase_01 AC 31 ms
13,736 KB
testcase_02 AC 31 ms
13,832 KB
testcase_03 AC 31 ms
13,720 KB
testcase_04 AC 31 ms
13,796 KB
testcase_05 AC 32 ms
13,736 KB
testcase_06 AC 31 ms
13,720 KB
testcase_07 AC 31 ms
13,724 KB
testcase_08 AC 31 ms
13,920 KB
testcase_09 AC 32 ms
13,904 KB
testcase_10 AC 31 ms
13,716 KB
testcase_11 AC 30 ms
13,736 KB
testcase_12 AC 31 ms
13,888 KB
testcase_13 AC 31 ms
13,732 KB
testcase_14 AC 32 ms
13,872 KB
testcase_15 AC 31 ms
13,748 KB
testcase_16 AC 31 ms
13,768 KB
testcase_17 AC 32 ms
13,924 KB
testcase_18 AC 31 ms
13,884 KB
testcase_19 AC 31 ms
13,736 KB
testcase_20 AC 32 ms
13,792 KB
testcase_21 AC 32 ms
13,828 KB
testcase_22 AC 31 ms
13,712 KB
testcase_23 AC 31 ms
13,716 KB
testcase_24 AC 32 ms
13,948 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 ((>= y 0)
		      (if (= x 0) 0 1))
 		     (else 2)))))
0