結果
| 問題 |
No.327 アルファベット列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-25 23:50:17 |
| 言語 | Haskell (9.10.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 247 bytes |
| コンパイル時間 | 8,631 ms |
| コンパイル使用メモリ | 176,644 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-09 19:59:38 |
| 合計ジャッジ時間 | 10,343 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 RE * 1 |
| other | AC * 1 WA * 49 |
コンパイルメッセージ
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
ソースコード
solve :: Int -> String
solve x = reverse $ map (\n -> a !! n) $ f x where
a = ['A'..'Z']
f x | x < 26 = [x - 1]
| otherwise = m : f (div (x - m) 26)
where
m = mod x 26
main = getLine >>= putStrLn . solve . read