結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2016-01-12 21:58:17 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 351 ms / 5,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 15,734 ms |
コンパイル使用メモリ | 188,832 KB |
実行使用メモリ | 34,984 KB |
最終ジャッジ日時 | 2024-11-21 18:32:34 |
合計ジャッジ時間 | 24,591 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (303 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/
ソースコード
let ``No.48 ロボットの操縦`` () =let X = int <| stdin.ReadLine()let Y = int <| stdin.ReadLine()let L = int <| stdin.ReadLine()let a =if X = 0 && 0 <= Y then 0elif Y < 0 then 2else 1[abs X; abs Y]|> List.map (fun a -> a/L+ (if a % L = 0 then 0 else 1))|> List.fold (fun s n -> s + n) a|> printfn "%d"``No.48 ロボットの操縦`` ()