結果
問題 | No.48 ロボットの操縦 |
ユーザー | regerege |
提出日時 | 2016-01-12 21:58:17 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 87 ms / 5,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 5,124 ms |
コンパイル使用メモリ | 157,064 KB |
実行使用メモリ | 24,988 KB |
最終ジャッジ日時 | 2023-08-14 00:20:01 |
合計ジャッジ時間 | 7,713 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 83 ms
24,928 KB |
testcase_01 | AC | 83 ms
22,876 KB |
testcase_02 | AC | 82 ms
22,880 KB |
testcase_03 | AC | 82 ms
24,984 KB |
testcase_04 | AC | 81 ms
22,956 KB |
testcase_05 | AC | 82 ms
24,988 KB |
testcase_06 | AC | 82 ms
22,804 KB |
testcase_07 | AC | 81 ms
22,872 KB |
testcase_08 | AC | 82 ms
22,808 KB |
testcase_09 | AC | 84 ms
24,864 KB |
testcase_10 | AC | 82 ms
22,892 KB |
testcase_11 | AC | 83 ms
22,812 KB |
testcase_12 | AC | 82 ms
20,900 KB |
testcase_13 | AC | 83 ms
24,856 KB |
testcase_14 | AC | 82 ms
20,976 KB |
testcase_15 | AC | 82 ms
23,004 KB |
testcase_16 | AC | 82 ms
22,976 KB |
testcase_17 | AC | 82 ms
22,916 KB |
testcase_18 | AC | 82 ms
22,816 KB |
testcase_19 | AC | 87 ms
22,868 KB |
testcase_20 | AC | 84 ms
24,956 KB |
testcase_21 | AC | 83 ms
22,996 KB |
testcase_22 | AC | 84 ms
24,924 KB |
testcase_23 | AC | 82 ms
22,892 KB |
testcase_24 | AC | 83 ms
24,984 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
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 0 elif Y < 0 then 2 else 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 ロボットの操縦`` ()