結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2016-08-18 19:14:36 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 344 ms / 5,000 ms |
コード長 | 579 bytes |
コンパイル時間 | 16,962 ms |
コンパイル使用メモリ | 188,740 KB |
実行使用メモリ | 34,732 KB |
最終ジャッジ日時 | 2024-11-21 18:47:33 |
合計ジャッジ時間 | 25,587 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (688 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
open System type Sol() = member this.Solve() = let X = stdin.ReadLine() |> int let Y = stdin.ReadLine() |> int let L = stdin.ReadLine() |> int let mutable ans = 0 ans <- if (Y >= 0) && (X = 0) then 0 elif (Y >= 0) then 1 else 2 let aX = abs X let aY = abs Y ans <- ans + aX / L + (if (aX % L) = 0 then 0 else 1) ans <- ans + aY / L + (if (aY % L) = 0 then 0 else 1) printfn "%d" ans let mySol = new Sol() mySol.Solve()