結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-22 22:28:12 |
| 言語 | Haskell (9.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 287 bytes |
| 記録 | |
| コンパイル時間 | 1,025 ms |
| コンパイル使用メモリ | 192,000 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-26 06:47:04 |
| 合計ジャッジ時間 | 1,764 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 11 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:6:1: warning: [GHC-94817] [-Wtabs]
Tab character found here, and in six further locations.
Suggested fix: Please use spaces instead.
|
6 | where
| ^^^^^^^^
[2 of 2] Linking a.out
ソースコード
import Data.Char main = getLine >>= putStrLn . solve solve :: String -> String solve xs = fst $ foldr ff ([], m) xs where m = length xs ff x (acc, n) | ord x - n < ord 'A' = ((chr $ ord 'Z' - ord x + n - 1 + ord 'A') : acc, n - 1) | otherwise = ((chr $ ord x - n) : acc, n - 1)