結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
r6eve
|
| 提出日時 | 2017-08-10 10:03:04 |
| 言語 | OCaml (5.2.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 262 bytes |
| コンパイル時間 | 315 ms |
| コンパイル使用メモリ | 21,452 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 00:06:38 |
| 合計ジャッジ時間 | 1,316 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 21 |
ソースコード
let () =
let x, y, l = Scanf.scanf "%d %d %d " (fun x y l -> x, y, l) in
let move v = v / l + v mod l in
let d = (if x = 0 then 0 else if x > 0 then 1 + move x else 1 + move (-x))
+ (if y >= 0 then move y else 1 + move (-y)) in
Printf.printf "%d\n" d
r6eve