Submission #2230506


Source Code Expand

import Control.Monad
import Control.Applicative
import Data.List

main = do
    n <- readLn
    putStrLn (show 2*n)

Submission Info

Submission Time
Task A - 流行
User ururu76
Language Haskell (GHC 7.10.3)
Score 0
Code Size 121 Byte
Status CE

Compile Error

Main.hs:7:21:
    No instance for (Num String) arising from a use of ‘*’
    In the first argument of ‘putStrLn’, namely ‘(show 2 * n)’
    In a stmt of a 'do' block: putStrLn (show 2 * n)
    In the expression:
      do { n <- readLn;
           putStrLn (show 2 * n) }