結果

問題 No.405 ローマ数字の腕時計
ユーザー ichibanshiboriichibanshibori
提出日時 2016-08-06 14:20:41
言語 F#
(F# 4.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 3,823 ms
コンパイル使用メモリ 159,340 KB
実行使用メモリ 24,764 KB
最終ジャッジ日時 2023-09-21 00:16:01
合計ジャッジ時間 7,095 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
24,668 KB
testcase_01 AC 78 ms
22,664 KB
testcase_02 AC 77 ms
22,512 KB
testcase_03 AC 78 ms
22,600 KB
testcase_04 AC 78 ms
22,556 KB
testcase_05 AC 77 ms
20,528 KB
testcase_06 AC 79 ms
24,716 KB
testcase_07 AC 79 ms
22,624 KB
testcase_08 AC 79 ms
24,664 KB
testcase_09 AC 80 ms
22,616 KB
testcase_10 AC 81 ms
24,764 KB
testcase_11 AC 79 ms
20,672 KB
testcase_12 AC 80 ms
22,608 KB
testcase_13 AC 80 ms
22,552 KB
testcase_14 AC 80 ms
24,692 KB
testcase_15 AC 80 ms
24,664 KB
testcase_16 AC 79 ms
24,712 KB
testcase_17 AC 79 ms
22,584 KB
testcase_18 AC 78 ms
22,616 KB
testcase_19 AC 80 ms
22,608 KB
testcase_20 AC 80 ms
22,580 KB
testcase_21 AC 78 ms
22,808 KB
testcase_22 AC 79 ms
22,580 KB
testcase_23 AC 79 ms
22,564 KB
testcase_24 AC 79 ms
22,724 KB
testcase_25 AC 84 ms
24,736 KB
testcase_26 AC 79 ms
24,620 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let doIt () =
    let convTbl = [| "XII"; "I"; "II"; "III"; "IIII"; "V"; "VI"; "VII"; "VIII"; "IX"; "X"; "XI" |]
    let shour, dh = stdin.ReadLine () |> fun str -> str.Split () |> fun arr -> (arr.[0], int arr.[1])
    let hour = Array.findIndex (fun s -> s = shour) convTbl

    (hour + (dh % 12) + 12) % 12 |> fun h -> convTbl.[h] |> printfn "%s"

doIt ()
0