結果

問題 No.722 100×100=1000
ユーザー lvs7k
提出日時 2018-09-15 10:03:06
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 4,650 ms
コンパイル使用メモリ 172,416 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 11:09:56
合計ジャッジ時間 2,554 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 24 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

module Main where

import Control.Monad

low = -99999999
high = 99999999

main :: IO ()
main = do
    [a, b] <- fmap read . words <$> getLine :: IO [Integer]
    case (a `mod` 100, b `mod` 100) of
        (0, 0) -> do
            print $ a * b `div` 10
        _      -> do
            let ans = a * b
            if (ans < low) || (high < ans)
                then putStrLn "E"
                else print ans
0