結果

問題 No.129 お年玉(2)
ユーザー furafura
提出日時 2020-05-12 01:14:46
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 253 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 2,239 ms
コンパイル使用メモリ 198,380 KB
実行使用メモリ 390,888 KB
最終ジャッジ日時 2023-09-26 18:23:20
合計ジャッジ時間 8,370 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
89,692 KB
testcase_01 AC 253 ms
358,888 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 82 ms
251,660 KB
testcase_06 AC 111 ms
317,084 KB
testcase_07 AC 129 ms
351,852 KB
testcase_08 AC 99 ms
290,392 KB
testcase_09 AC 121 ms
337,584 KB
testcase_10 AC 132 ms
357,980 KB
testcase_11 AC 95 ms
284,248 KB
testcase_12 AC 115 ms
325,396 KB
testcase_13 AC 117 ms
331,540 KB
testcase_14 AC 115 ms
327,324 KB
testcase_15 AC 100 ms
296,588 KB
testcase_16 AC 109 ms
315,148 KB
testcase_17 AC 125 ms
347,728 KB
testcase_18 AC 120 ms
337,736 KB
testcase_19 AC 126 ms
350,020 KB
testcase_20 AC 126 ms
347,996 KB
testcase_21 AC 149 ms
388,700 KB
testcase_22 AC 99 ms
292,500 KB
testcase_23 AC 132 ms
364,124 KB
testcase_24 AC 130 ms
355,944 KB
testcase_25 AC 96 ms
284,504 KB
testcase_26 AC 98 ms
288,336 KB
testcase_27 AC 95 ms
284,248 KB
testcase_28 AC 149 ms
390,888 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 2 ms
4,376 KB
testcase_33 AC 8 ms
32,596 KB
testcase_34 AC 5 ms
20,064 KB
testcase_35 AC 8 ms
30,304 KB
testcase_36 AC 8 ms
32,464 KB
testcase_37 AC 9 ms
36,452 KB
testcase_38 AC 35 ms
130,708 KB
testcase_39 AC 46 ms
161,484 KB
testcase_40 AC 91 ms
274,132 KB
testcase_41 AC 64 ms
212,568 KB
testcase_42 AC 38 ms
138,848 KB
testcase_43 AC 37 ms
136,856 KB
testcase_44 AC 148 ms
390,756 KB
testcase_45 AC 26 ms
101,984 KB
testcase_46 AC 49 ms
171,696 KB
testcase_47 AC 147 ms
384,612 KB
testcase_48 AC 101 ms
298,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;
using lint=long long;

int main(){
	lint n;
	int m; cin>>n>>m;

	constexpr int MOD=1e9;
	static int C[10001][10001];
	rep(i,m+1) C[i][0]=1;
	for(int i=1;i<=m;i++) for(int j=1;j<=i;j++) C[i][j]=(C[i-1][j-1]+C[i-1][j])%MOD;

	printf("%d\n",C[m][(n/1000)%m]);

	return 0;
}
0