結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー LeonardoneLeonardone
提出日時 2019-12-13 02:08:19
言語 Haskell
(9.8.2)
結果
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
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 9 ms
8,704 KB
testcase_03 AC 70 ms
8,576 KB
testcase_04 AC 29 ms
8,448 KB
testcase_05 AC 41 ms
8,576 KB
testcase_06 AC 42 ms
8,704 KB
testcase_07 AC 73 ms
8,576 KB
testcase_08 AC 69 ms
8,832 KB
testcase_09 AC 61 ms
8,576 KB
testcase_10 AC 21 ms
8,704 KB
testcase_11 AC 14 ms
8,576 KB
testcase_12 AC 72 ms
8,832 KB
testcase_13 AC 27 ms
8,576 KB
testcase_14 AC 21 ms
8,704 KB
testcase_15 AC 77 ms
8,576 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 9 ms
8,576 KB
testcase_18 AC 24 ms
8,576 KB
testcase_19 AC 42 ms
8,576 KB
testcase_20 AC 78 ms
8,576 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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] . 

ソースコード

diff #

-- 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


0