結果

問題 No.129 お年玉(2)
ユーザー 6soukiti296soukiti29
提出日時 2017-09-04 19:49:36
言語 Nim
(2.0.2)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 397 bytes
コンパイル時間 3,983 ms
コンパイル使用メモリ 68,520 KB
実行使用メモリ 779,428 KB
最終ジャッジ日時 2023-09-12 15:07:18
合計ジャッジ時間 20,366 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
175,080 KB
testcase_01 MLE -
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 279 ms
351,632 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 1 ms
4,384 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 2 ms
5,064 KB
testcase_32 AC 2 ms
5,172 KB
testcase_33 AC 17 ms
62,636 KB
testcase_34 AC 9 ms
35,784 KB
testcase_35 AC 15 ms
58,532 KB
testcase_36 AC 16 ms
62,428 KB
testcase_37 AC 18 ms
70,628 KB
testcase_38 AC 98 ms
257,020 KB
testcase_39 AC 134 ms
320,636 KB
testcase_40 MLE -
testcase_41 AC 212 ms
422,892 KB
testcase_42 AC 108 ms
273,408 KB
testcase_43 AC 107 ms
271,516 KB
testcase_44 MLE -
testcase_45 AC 70 ms
201,900 KB
testcase_46 AC 148 ms
338,908 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:
            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