結果

問題 No.48 ロボットの操縦
ユーザー go_boardwalkgo_boardwalk
提出日時 2017-04-01 01:47:58
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 347 bytes
コンパイル時間 27 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 12,848 KB
最終ジャッジ日時 2023-09-21 21:53:19
合計ジャッジ時間 1,944 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
12,764 KB
testcase_01 AC 24 ms
12,624 KB
testcase_02 AC 23 ms
12,680 KB
testcase_03 AC 23 ms
12,724 KB
testcase_04 AC 23 ms
12,804 KB
testcase_05 AC 23 ms
12,608 KB
testcase_06 AC 23 ms
12,840 KB
testcase_07 AC 23 ms
12,720 KB
testcase_08 AC 23 ms
12,660 KB
testcase_09 AC 22 ms
12,600 KB
testcase_10 AC 22 ms
12,612 KB
testcase_11 AC 23 ms
12,828 KB
testcase_12 AC 23 ms
12,828 KB
testcase_13 AC 22 ms
12,756 KB
testcase_14 AC 23 ms
12,836 KB
testcase_15 AC 23 ms
12,824 KB
testcase_16 AC 22 ms
12,676 KB
testcase_17 AC 23 ms
12,840 KB
testcase_18 AC 22 ms
12,716 KB
testcase_19 AC 23 ms
12,608 KB
testcase_20 AC 23 ms
12,608 KB
testcase_21 AC 22 ms
12,720 KB
testcase_22 AC 23 ms
12,848 KB
testcase_23 AC 22 ms
12,808 KB
testcase_24 AC 22 ms
12,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define x (read))
(define y (read))
(define l (read))

(define turn
  (lambda (x y)
    (cond ((and (zero? x) (>= y 0)) 0)
          ((and (>= y 0)) 1)
          (else 2))))
(define mo
  (lambda (x) (if (zero? x)
                  0
                  1)))

(print (+ (turn x y) (div (abs x) l) (div (abs y) l) (mo (modulo x l)) (mo (modulo y l))))
0