結果

問題 No.129 お年玉(2)
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-01-02 17:37:37
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 345 ms / 5,000 ms
コード長 759 bytes
コンパイル時間 6,113 ms
コンパイル使用メモリ 312,112 KB
実行使用メモリ 394,368 KB
最終ジャッジ日時 2024-01-02 17:37:53
合計ジャッジ時間 15,144 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
22,656 KB
testcase_01 AC 345 ms
394,368 KB
testcase_02 AC 2 ms
6,548 KB
testcase_03 AC 1 ms
6,548 KB
testcase_04 AC 2 ms
6,548 KB
testcase_05 AC 139 ms
162,688 KB
testcase_06 AC 215 ms
256,896 KB
testcase_07 AC 265 ms
314,880 KB
testcase_08 AC 181 ms
214,784 KB
testcase_09 AC 243 ms
289,920 KB
testcase_10 AC 275 ms
326,272 KB
testcase_11 AC 173 ms
205,952 KB
testcase_12 AC 225 ms
268,928 KB
testcase_13 AC 241 ms
281,472 KB
testcase_14 AC 227 ms
271,744 KB
testcase_15 AC 188 ms
223,616 KB
testcase_16 AC 215 ms
254,208 KB
testcase_17 AC 265 ms
308,736 KB
testcase_18 AC 244 ms
290,816 KB
testcase_19 AC 258 ms
310,400 KB
testcase_20 AC 261 ms
307,968 KB
testcase_21 AC 322 ms
385,152 KB
testcase_22 AC 182 ms
217,088 KB
testcase_23 AC 288 ms
336,384 KB
testcase_24 AC 271 ms
322,944 KB
testcase_25 AC 173 ms
207,104 KB
testcase_26 AC 178 ms
212,224 KB
testcase_27 AC 176 ms
205,696 KB
testcase_28 AC 327 ms
389,120 KB
testcase_29 AC 2 ms
6,548 KB
testcase_30 AC 2 ms
6,548 KB
testcase_31 AC 1 ms
6,548 KB
testcase_32 AC 1 ms
6,548 KB
testcase_33 AC 4 ms
6,548 KB
testcase_34 AC 2 ms
6,548 KB
testcase_35 AC 3 ms
6,548 KB
testcase_36 AC 4 ms
6,548 KB
testcase_37 AC 5 ms
6,656 KB
testcase_38 AC 37 ms
44,928 KB
testcase_39 AC 56 ms
68,096 KB
testcase_40 AC 162 ms
192,256 KB
testcase_41 AC 98 ms
117,248 KB
testcase_42 AC 42 ms
50,944 KB
testcase_43 AC 42 ms
50,048 KB
testcase_44 AC 328 ms
391,296 KB
testcase_45 AC 24 ms
28,800 KB
testcase_46 AC 62 ms
76,032 KB
testcase_47 AC 317 ms
377,728 KB
testcase_48 AC 191 ms
226,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k))
#define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k))
#define ll long long
#define list(T,A,N) vector<T> A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];}

const ll mod = 1000000000;
using mint = static_modint<1000000000>;




int main(){
    
    ll N,M;
    cin >> N >> M;
    N /= 1000;
    N %= M;
    vector<vector<mint>> C(M+1,vector<mint>(M+1,mint(0)));
    rep(i,0,M+1,1){
        C[i][0] = mint(1);
    }
    rep(i,1,M+1,1){
        rep(j,1,i+1,1){
            C[i][j] = C[i-1][j-1] + C[i-1][j];
        }
    }
    cout << C[M][N].val() << endl;
    return 0;


}
0