結果
問題 | No.405 ローマ数字の腕時計 |
ユーザー | Naoki_M_ |
提出日時 | 2016-08-08 09:28:16 |
言語 | Haskell (9.8.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 1,911 ms |
コンパイル使用メモリ | 173,056 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-06 12:28:03 |
合計ジャッジ時間 | 2,818 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,812 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 1 ms
6,944 KB |
testcase_04 | WA | - |
testcase_05 | AC | 2 ms
6,940 KB |
testcase_06 | AC | 1 ms
6,940 KB |
testcase_07 | AC | 1 ms
6,940 KB |
testcase_08 | WA | - |
testcase_09 | AC | 2 ms
6,940 KB |
testcase_10 | AC | 2 ms
6,940 KB |
testcase_11 | AC | 2 ms
6,940 KB |
testcase_12 | AC | 2 ms
6,944 KB |
testcase_13 | AC | 2 ms
6,944 KB |
testcase_14 | WA | - |
testcase_15 | AC | 2 ms
6,944 KB |
testcase_16 | AC | 2 ms
6,944 KB |
testcase_17 | AC | 2 ms
6,940 KB |
testcase_18 | WA | - |
testcase_19 | AC | 2 ms
6,944 KB |
testcase_20 | AC | 2 ms
6,944 KB |
testcase_21 | AC | 2 ms
6,940 KB |
testcase_22 | AC | 1 ms
6,940 KB |
testcase_23 | AC | 1 ms
6,944 KB |
testcase_24 | AC | 1 ms
6,940 KB |
testcase_25 | AC | 2 ms
6,940 KB |
testcase_26 | AC | 1 ms
6,944 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) Main.hs:3:100: warning: [GHC-63394] [-Wx-partial] In the use of ‘head’ (imported from Prelude, but defined in GHC.List): "This is a partial function, it throws an error on empty lists. Use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty." | 3 | solve ls = ["I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"] !! (((sum $ map calc (head ls)) + (read (last ls)) + 11) `mod` 12) | ^^^^ [2 of 2] Linking a.out
ソースコード
main = getLine >>= putStrLn . solve . words solve ls = ["I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"] !! (((sum $ map calc (head ls)) + (read (last ls)) + 11) `mod` 12) calc 'I' = 1 calc 'V' = 5 calc 'X' = 10