結果

問題 No.163 cAPSlOCK
ユーザー tk55513tk55513
提出日時 2020-12-21 02:06:03
言語 Haskell
(9.8.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 917 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 148,608 KB
最終ジャッジ日時 2024-04-27 03:32:49
合計ジャッジ時間 499 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
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:5:1: error: [GHC-87110]
    Could not load module ‘Data.Time’.
    It is a member of the hidden package ‘time-1.12.2’.
    Use -v to see a list of the files searched for.
  |
5 | import Data.Time
  | ^^^^^^^^^^^^^^^^

Main.hs:6:1: error: [GHC-87110]
    Could not load module ‘Data.Time.Calendar’.
    It is a member of the hidden package ‘time-1.12.2’.
    Use -v to see a list of the files searched for.
  |
6 | import Data.Time.Calendar
  | ^^^^^^^^^^^^^^^^^^^^^^^^^

ソースコード

diff #

import Control.Monad
import Data.List
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.Time
import Data.Time.Calendar
import Data.Char

tuplify2 (x:y:_) = (x,y)
tuplify2 _ = undefined

--Input functions with ByteString
readInt = fst . fromJust . BS.readInteger
readIntTuple = tuplify2 . map readInt . BS.words
readIntList = map readInt . BS.words

getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine
getIntNList n = map readIntList <$> replicateM (fromIntegral n) BS.getLine
getIntMatrix = map readIntList . BS.lines <$> BS.getContents
getIntTuple = readIntTuple <$> BS.getLine
getIntNTuples n = map readIntTuple <$> replicateM (fromIntegral n) BS.getLine
getIntTuples = map readIntTuple . BS.lines <$> BS.getContents

p :: (Show a)=>a->IO ()
p=putStrLn.show
ps=putStrLn

main=do
    s<-getLine
    putStrLn$map (\c->(if (isUpper c) then (toLower c) else (toUpper c))) s
0