結果

問題 No.129 お年玉(2)
ユーザー 6soukiti296soukiti29
提出日時 2019-09-11 09:38:52
言語 Nim
(2.0.2)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 379 bytes
コンパイル時間 3,341 ms
コンパイル使用メモリ 68,292 KB
実行使用メモリ 685,328 KB
最終ジャッジ日時 2023-09-15 13:45:34
合計ジャッジ時間 19,660 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
99,188 KB
testcase_01 AC 820 ms
502,072 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 325 ms
309,068 KB
testcase_06 MLE -
testcase_07 MLE -
testcase_08 AC 345 ms
495,368 KB
testcase_09 MLE -
testcase_10 MLE -
testcase_11 AC 330 ms
486,120 KB
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 AC 364 ms
510,080 KB
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
testcase_21 MLE -
testcase_22 AC 378 ms
503,100 KB
testcase_23 MLE -
testcase_24 MLE -
testcase_25 AC 591 ms
492,496 KB
testcase_26 AC 399 ms
497,780 KB
testcase_27 AC 568 ms
490,920 KB
testcase_28 MLE -
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 1 ms
4,376 KB
testcase_31 AC 2 ms
5,228 KB
testcase_32 AC 3 ms
5,152 KB
testcase_33 AC 16 ms
62,456 KB
testcase_34 AC 9 ms
35,884 KB
testcase_35 AC 14 ms
58,344 KB
testcase_36 AC 16 ms
62,636 KB
testcase_37 AC 18 ms
70,816 KB
testcase_38 AC 91 ms
257,148 KB
testcase_39 AC 123 ms
320,496 KB
testcase_40 AC 586 ms
469,364 KB
testcase_41 AC 186 ms
395,284 KB
testcase_42 AC 97 ms
273,396 KB
testcase_43 AC 96 ms
271,352 KB
testcase_44 MLE -
testcase_45 AC 64 ms
201,892 KB
testcase_46 AC 131 ms
339,048 KB
testcase_47 MLE -
testcase_48 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]

ソースコード

diff #

import sequtils,strutils
var
    N = stdin.readline.parseBiggestInt
    M = stdin.readline.parseBiggestInt
    c = (N div 1000) mod M
    memo : array[10001, array[10001, int64]]
for i in 0..M:
    for j in 0..i:
        if j == 0 or j == i:
            memo[i][j] = 1
        else:
            memo[i][j] = (memo[i - 1][j] + memo[i - 1][j - 1]) mod 1_000_000_000
echo memo[M][c]
0