結果

問題 No.250 atetubouのzetubou
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-30 19:07:14
言語 Haskell
(9.8.2)
結果
AC  
実行時間 1,572 ms / 5,000 ms
コード長 439 bytes
コンパイル時間 6,403 ms
コンパイル使用メモリ 165,540 KB
実行使用メモリ 13,580 KB
最終ジャッジ日時 2023-10-11 06:12:10
合計ジャッジ時間 25,083 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 912 ms
12,796 KB
testcase_01 AC 172 ms
12,424 KB
testcase_02 AC 1,381 ms
12,952 KB
testcase_03 AC 1,572 ms
13,580 KB
testcase_04 AC 1,363 ms
13,500 KB
testcase_05 AC 1,422 ms
13,532 KB
testcase_06 AC 1,092 ms
13,504 KB
testcase_07 AC 543 ms
13,440 KB
testcase_08 AC 1,302 ms
12,700 KB
testcase_09 AC 982 ms
13,580 KB
testcase_10 AC 1,392 ms
12,892 KB
testcase_11 AC 842 ms
12,792 KB
testcase_12 AC 1,302 ms
13,488 KB
testcase_13 AC 713 ms
12,800 KB
testcase_14 AC 22 ms
11,696 KB
testcase_15 AC 762 ms
12,684 KB
testcase_16 AC 752 ms
13,400 KB
testcase_17 AC 752 ms
13,436 KB
testcase_18 AC 742 ms
12,620 KB
testcase_19 AC 763 ms
12,944 KB
testcase_20 AC 3 ms
7,192 KB
testcase_21 AC 3 ms
7,596 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 #

combi :: Integral a => a -> a -> a
combi n m = product [n, n - 1 .. n - m + 1] `div` product [1 .. m]

judge :: Integer -> Integer -> Integer -> String
judge d x t
    | (<= t) $ flip combi x $ x + d - 1 = "AC"
    | otherwise                         = "ZETUBOU"

main :: IO ()
main = do
    _ <- getLine
    putStr . unlines .
        map (\(d : x : t : _) -> judge d x t) .
            map (map read) . map words . lines =<< getContents
0