結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  yutasth | 
| 提出日時 | 2017-05-04 14:42:14 | 
| 言語 | Haskell (9.10.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 337 bytes | 
| コンパイル時間 | 3,700 ms | 
| コンパイル使用メモリ | 172,928 KB | 
| 実行使用メモリ | 6,816 KB | 
| 最終ジャッジ日時 | 2024-12-31 01:37:30 | 
| 合計ジャッジ時間 | 4,138 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
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
ソースコード
import Prelude import Data.Char (digitToInt) months :: [(Int, Int)] months = zip [1..] [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] main :: IO () main = print calc calc :: Int calc = sum $ map (\(m, md) -> length $ filter ((==) m . sumDigits) [1..md]) $ months sumDigits :: Int -> Int sumDigits d = sum $ map digitToInt $ show d
