結果

問題 No.129 お年玉(2)
ユーザー 6soukiti296soukiti29
提出日時 2017-09-04 19:48:39
言語 Nim
(2.0.2)
結果
MLE  
実行時間 -
コード長 397 bytes
コンパイル時間 2,803 ms
コンパイル使用メモリ 68,576 KB
実行使用メモリ 779,268 KB
最終ジャッジ日時 2023-09-12 15:06:57
合計ジャッジ時間 18,839 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
102,680 KB
testcase_01 MLE -
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 285 ms
420,592 KB
testcase_06 MLE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 MLE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
testcase_21 MLE -
testcase_22 MLE -
testcase_23 MLE -
testcase_24 MLE -
testcase_25 MLE -
testcase_26 MLE -
testcase_27 MLE -
testcase_28 MLE -
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
5,124 KB
testcase_32 AC 2 ms
5,164 KB
testcase_33 AC 17 ms
62,472 KB
testcase_34 AC 9 ms
35,852 KB
testcase_35 AC 15 ms
58,364 KB
testcase_36 AC 16 ms
62,632 KB
testcase_37 AC 19 ms
70,824 KB
testcase_38 AC 100 ms
257,012 KB
testcase_39 AC 137 ms
320,472 KB
testcase_40 MLE -
testcase_41 AC 214 ms
422,900 KB
testcase_42 AC 109 ms
273,396 KB
testcase_43 AC 106 ms
271,536 KB
testcase_44 MLE -
testcase_45 AC 69 ms
201,688 KB
testcase_46 AC 150 ms
338,944 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[10000, array[10000, int64]]
for i in 0..M:
    for j in 0..i:
        if j == 0:
            memo[i][j] = 1
        else:
            memo[i][j] = (memo[i - 1][j] + memo[i - 1][j - 1]) mod 1_000_000_000
    #echo memo[i][0..i.int]
echo memo[M][c]
0