結果
| 問題 |
No.485 方程式のお勉強
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-14 10:36:35 |
| 言語 | Haskell (9.10.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 640 bytes |
| コンパイル時間 | 625 ms |
| コンパイル使用メモリ | 150,656 KB |
| 最終ジャッジ日時 | 2024-11-14 20:00:44 |
| 合計ジャッジ時間 | 1,043 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、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:11:1: error: [GHC-87110]
Could not load module ‘Data.Map’.
It is a member of the hidden package ‘containers-0.6.8’.
Use -v to see a list of the files searched for.
|
11 | import qualified Data.Map as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Main.hs:16: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.
|
16 | import Data.Time.Calendar
| ^^^^^^^^^^^^^^^^^^^^^^^^^
ソースコード
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
module Main where
import qualified Data.ByteString.Char8 as B8
import Data.Maybe (fromJust)
import Data.Char (toUpper,isDigit)
import Data.List
import qualified Data.Map as M
import Data.Ix (range)
import Control.Monad
import Control.Applicative
import Text.Printf
import Data.Time.Calendar
import Debug.Trace
readDigits = map read <$> words <$> getLine :: IO [Int]
readDigits' = map read <$> lines <$> getContents :: IO [Int]
main = do
[a,b] <- readDigits
putStrLn $ case (b `mod` a) of
0 -> show $ b `div` a
_ -> "NO"