結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
go_boardwalk
|
| 提出日時 | 2017-04-01 01:33:33 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 410 bytes |
| コンパイル時間 | 94 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-07-07 15:05:24 |
| 合計ジャッジ時間 | 6,657 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 21 |
ソースコード
(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))))
(print (let loop ((X (abs x)) (Y (abs y)) (L l) (cnt (turn x y)))
(cond ((> X 0)
(loop (- X L) Y L (+ cnt 1)))
((> Y 0)
(loop X (- Y L) L (+ cnt 1)))
(else cnt))))
go_boardwalk