結果

問題 No.405 ローマ数字の腕時計
ユーザー kuuso1kuuso1
提出日時 2016-08-16 08:26:20
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 704 bytes
コンパイル時間 4,779 ms
コンパイル使用メモリ 171,776 KB
実行使用メモリ 24,224 KB
最終ジャッジ日時 2023-08-25 18:19:15
合計ジャッジ時間 7,232 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
24,136 KB
testcase_01 AC 57 ms
22,072 KB
testcase_02 AC 57 ms
22,096 KB
testcase_03 AC 57 ms
22,076 KB
testcase_04 AC 58 ms
22,144 KB
testcase_05 AC 57 ms
24,176 KB
testcase_06 AC 58 ms
22,052 KB
testcase_07 WA -
testcase_08 AC 57 ms
22,064 KB
testcase_09 AC 57 ms
24,148 KB
testcase_10 AC 57 ms
22,012 KB
testcase_11 AC 57 ms
22,096 KB
testcase_12 AC 57 ms
22,048 KB
testcase_13 AC 57 ms
24,136 KB
testcase_14 AC 58 ms
24,224 KB
testcase_15 AC 57 ms
24,128 KB
testcase_16 AC 58 ms
22,124 KB
testcase_17 AC 58 ms
22,016 KB
testcase_18 AC 57 ms
22,096 KB
testcase_19 AC 57 ms
22,008 KB
testcase_20 AC 58 ms
24,112 KB
testcase_21 AC 58 ms
22,092 KB
testcase_22 AC 58 ms
22,148 KB
testcase_23 WA -
testcase_24 AC 57 ms
22,064 KB
testcase_25 AC 58 ms
22,088 KB
testcase_26 AC 59 ms
22,120 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        let f s =
            match s with
            | "I"   -> 1
            | "II"  -> 2
            | "III" -> 3
            | "IIII"  -> 4
            | "V"   -> 5
            | "VI"  -> 6
            | "VII" -> 7
            | "VIII" -> 8
            | "IX"  -> 9
            | "X"   -> 10
            | "XI"  -> 11
            | "XII" -> 12
            | _ -> 0
        let invf = [| "XII";"I";"II";"III";"IV";"V";"VI";"VII";"VIII";"IX";"X";"XI" |]
        let ans = stdin.ReadLine().Split(' ') |> (fun ss -> ( (f ss.[0]) + (int ss.[1]) + 12*10000 ) % 12)
        Console.WriteLine(invf.[ans])
            

let mySol = new Sol()
mySol.Solve()
0