結果
| 問題 | No.164 ちっちゃくないよ!! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-05-12 13:19:01 |
| 言語 | Haskell (9.14.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 47 ms / 2,000 ms |
| + 412µs | |
| コード長 | 673 bytes |
| 記録 | |
| コンパイル時間 | 9,976 ms |
| コンパイル使用メモリ | 195,072 KB |
| 実行使用メモリ | 27,776 KB |
| 最終ジャッジ日時 | 2026-09-16 20:06:27 |
| 合計ジャッジ時間 | 6,552 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:5:1: warning: [GHC-94817] [-Wtabs]
Tab character found here, and in four further locations.
Suggested fix: Please use spaces instead.
|
5 | where r = map (\x -> if x >= b then Nothing else Just x) (reverse n)
| ^^^^^^^^
[2 of 2] Linking a.out
ソースコード
import Data.Char base :: [Integer] -> Integer -> Maybe Integer base n b = fmap sum $ sequence $ zipWith fmap (map (*) (iterate (* b) 1)) r where r = map (\x -> if x >= b then Nothing else Just x) (reverse n) minM' :: Maybe Integer -> Maybe Integer -> Maybe Integer minM' a Nothing = a minM' Nothing b = b minM' a b = fmap minimum (sequence [a, b]) minM :: [Maybe Integer] -> Maybe Integer minM [] = Nothing minM (x:xs) = minM' x (minM xs) main = do getLine nums <- getContents >>= return . map (map (\c -> if isDigit c then ord c - 48 else ord c - 65 + 10)) . lines let Just m = minM [base (map fromIntegral n) (fromIntegral b) | n <- nums, b <- [2..36]] print $ m