結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
chike_plus
|
| 提出日時 | 2019-03-23 07:12:02 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 73 ms / 5,000 ms |
| コード長 | 504 bytes |
| 記録 | |
| コンパイル時間 | 7,882 ms |
| コンパイル使用メモリ | 213,188 KB |
| 実行使用メモリ | 31,400 KB |
| 最終ジャッジ日時 | 2026-04-09 23:34:02 |
| 合計ジャッジ時間 | 10,215 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (221 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
let ``No.48 ロボットの操縦``() =
let X = stdin.ReadLine() |> int
let Y = stdin.ReadLine() |> int
let L = stdin.ReadLine() |> int
let direction x y =
match x, y with
| _ , _ when y < 0 -> 2
| _ , _ when y >= 0 && x <> 0 -> 1
| 0 , _ -> 0
| _ , _ -> 1
let sum = direction X Y
let sum = sum + abs(X / L) + if (X % L = 0) then 0 else 1
let sum = sum + abs(Y / L) + if (Y % L = 0) then 0 else 1
stdout.WriteLine sum
``No.48 ロボットの操縦``()
chike_plus