結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-08-16 20:08:48 | 
| 言語 | Haskell (9.10.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 224 bytes | 
| コンパイル時間 | 1,517 ms | 
| コンパイル使用メモリ | 172,544 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-07 06:14:02 | 
| 合計ジャッジ時間 | 2,264 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 | 
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
<no location info>: warning: [GHC-98887]
    -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
[1 of 2] Compiling Main             ( Main.hs, Main.o )
Main.hs:6:1: warning: [GHC-94817] [-Wtabs]
    Tab character found here, and in one further location.
    Suggested fix: Please use spaces instead.
  |
6 |         let next = ord c - ord 'A' - n + 26
  | ^^^^^^^^
[2 of 2] Linking a.out
            
            ソースコード
{-# LANGUAGE Safe #-}
import Data.Char
import Control.Applicative
loop n c= 
	let next = ord c - ord 'A' - n + 26
	in chr$next `mod` 26 + ord 'A'
run f (a,b)=f a b
main = putStrLn =<<fmap (run loop)<$>zip [1..] <$> getLine
            
            
            
        