結果
問題 | No.721 Die tertia (ディエ・テルツィア) |
ユーザー |
|
提出日時 | 2019-12-13 02:08:19 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 709 bytes |
コンパイル時間 | 7,497 ms |
コンパイル使用メモリ | 176,624 KB |
実行使用メモリ | 8,832 KB |
最終ジャッジ日時 | 2024-06-26 04:06:51 |
合計ジャッジ時間 | 8,947 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
コンパイルメッセージ
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:4:19: warning: [GHC-63394] [-Wx-partial] In the use of ‘head’ (imported from Prelude, but defined in GHC.List): "This is a partial function, it throws an error on empty lists. Use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty." | 4 | main = interact $ head . drop 2 . flip dropWhile (map (tail . concat . map ('/':) . zipWith ($) [drop 1, drop 3, drop 3] . map (show . (+10000))) (filter (not . all id . zipWith ($) [not . (foldl1 (==) . map (== 0) . zipWith ($) [(`mod` 4), (`mod` 100), (`mod` 400)] . repeat), (== 2), (== 29)]) . filter ((>= 0) . foldl1 subtract . zipWith ($) [(!!2), maybe 0 id . flip lookup ([(2, 29)] ++ map (flip (,) 30) [4,6,9,11] ++ map (flip (,) 31) [1,3,5,7,8,10,12]) . (!!1)] . repeat) $ (concat . map (zipWith (flip (++) . return) [1..31] . repeat) . concat $ map (zipWith (flip (++) . return) [1..12] . repeat . return) [2000..2401]))) . (/=) . take 10 | ^^^^ Main.hs:4:56: warning: [GHC-63394] [-Wx-partial] In the use of ‘tail’ (imported from Prelude, but defined in GHC.List): "This is a partial function, it throws an error on empty lists. Replace it with drop 1, or use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty." | 4 | main = interact $ head . drop 2 . flip dropWhile (map (tail . concat . map ('/':) . zipWith ($) [drop 1, drop 3, drop 3] . map (show . (+10000))) (filter (not . all id . zipWith ($) [not . (foldl1 (==) . map (== 0) . zipWith ($) [(`mod` 4), (`mod` 100), (`mod` 400)] . repeat), (== 2), (== 29)]) . filter ((>= 0) . foldl1 subtract . zipWith ($) [(!!2), maybe 0 id . flip lookup ([(2, 29)] ++ map (flip (,) 30) [4,6,9,11] ++ map (flip (,) 31) [1,3,5,7,8,10,12]) . (!!1)] . repeat) $ (concat . map (zipWith (flip (++) . return) [1..31] .
ソースコード
-- Practice yukicoder -- author: Leonardone @ NEETSDKASU main = interact $ head . drop 2 . flip dropWhile (map (tail . concat . map ('/':) . zipWith ($) [drop 1, drop 3, drop 3] . map (show . (+10000))) (filter (not . all id . zipWith ($) [not . (foldl1 (==) . map (== 0) . zipWith ($) [(`mod` 4), (`mod` 100), (`mod` 400)] . repeat), (== 2), (== 29)]) . filter ((>= 0) . foldl1 subtract . zipWith ($) [(!!2), maybe 0 id . flip lookup ([(2, 29)] ++ map (flip (,) 30) [4,6,9,11] ++ map (flip (,) 31) [1,3,5,7,8,10,12]) . (!!1)] . repeat) $ (concat . map (zipWith (flip (++) . return) [1..31] . repeat) . concat $ map (zipWith (flip (++) . return) [1..12] . repeat . return) [2000..2401]))) . (/=) . take 10