結果

問題 No.944 煎っぞ!
ユーザー LeonardoneLeonardone
提出日時 2019-12-07 09:33:36
言語 Haskell
(9.8.2)
結果
AC  
実行時間 142 ms / 3,000 ms
コード長 406 bytes
コンパイル時間 8,280 ms
コンパイル使用メモリ 163,204 KB
実行使用メモリ 28,544 KB
最終ジャッジ日時 2023-08-26 02:15:15
合計ジャッジ時間 13,130 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
25,188 KB
testcase_01 AC 122 ms
24,164 KB
testcase_02 AC 112 ms
23,276 KB
testcase_03 AC 122 ms
25,144 KB
testcase_04 AC 122 ms
24,196 KB
testcase_05 AC 122 ms
23,400 KB
testcase_06 AC 121 ms
24,036 KB
testcase_07 AC 122 ms
23,368 KB
testcase_08 AC 122 ms
24,032 KB
testcase_09 AC 122 ms
24,144 KB
testcase_10 AC 5 ms
11,644 KB
testcase_11 AC 32 ms
13,112 KB
testcase_12 AC 22 ms
12,556 KB
testcase_13 AC 2 ms
7,828 KB
testcase_14 AC 32 ms
12,884 KB
testcase_15 AC 22 ms
12,036 KB
testcase_16 AC 2 ms
7,776 KB
testcase_17 AC 3 ms
7,864 KB
testcase_18 AC 32 ms
13,028 KB
testcase_19 AC 32 ms
13,216 KB
testcase_20 AC 142 ms
24,180 KB
testcase_21 AC 132 ms
24,132 KB
testcase_22 AC 123 ms
27,828 KB
testcase_23 AC 123 ms
27,676 KB
testcase_24 AC 122 ms
27,672 KB
testcase_25 AC 122 ms
27,724 KB
testcase_26 AC 122 ms
27,960 KB
testcase_27 AC 132 ms
27,644 KB
testcase_28 AC 2 ms
7,600 KB
testcase_29 AC 2 ms
7,596 KB
testcase_30 AC 132 ms
25,164 KB
testcase_31 AC 132 ms
27,676 KB
testcase_32 AC 132 ms
27,672 KB
testcase_33 AC 132 ms
28,532 KB
testcase_34 AC 132 ms
28,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

-- Try yukicoder 
-- author: Leonardone @ NEETSDKASU

import Data.List (find)
import qualified Data.Set as S

main = interact $ show . solve . map read . tail . words

solve xs = maybe 1 (div a) $ find f ys
    where
        a = sum xs
        ys = scanl1 (+) xs
        s = S.fromList ys
        f e = m == 0 && (all (flip S.member s) $ map (* e) [1..d])
            where (d, m) = divMod a e
            
0