結果

問題 No.405 ローマ数字の腕時計
ユーザー Leonardone
提出日時 2016-08-09 06:17:48
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 2,048 ms
コンパイル使用メモリ 174,464 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-24 04:07:46
合計ジャッジ時間 2,735 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

-- yukicoder My Practice
-- author: Leonardone @ NEETSDKASU

roman = ["I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"]

main = print . solve . words =<< getLine

solve [t, a] = ans where
    h = length $ takeWhile (/= t) roman
    x = (h + 2400 + (read a)) `mod` 12
    ans = roman !! x
    
0