結果

問題 No.129 お年玉(2)
ユーザー sugim48sugim48
提出日時 2015-01-16 23:29:54
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 286 ms / 5,000 ms
コード長 901 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 327,316 KB
最終ジャッジ日時 2023-08-18 16:24:24
合計ジャッジ時間 12,985 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 286 ms
310,868 KB
testcase_01 AC 219 ms
317,164 KB
testcase_02 AC 219 ms
317,184 KB
testcase_03 AC 217 ms
324,692 KB
testcase_04 AC 212 ms
327,244 KB
testcase_05 AC 214 ms
327,044 KB
testcase_06 AC 214 ms
327,056 KB
testcase_07 AC 213 ms
327,052 KB
testcase_08 AC 215 ms
327,052 KB
testcase_09 AC 215 ms
327,292 KB
testcase_10 AC 213 ms
326,992 KB
testcase_11 AC 212 ms
327,316 KB
testcase_12 AC 210 ms
327,032 KB
testcase_13 AC 215 ms
327,028 KB
testcase_14 AC 215 ms
326,992 KB
testcase_15 AC 217 ms
327,316 KB
testcase_16 AC 222 ms
327,240 KB
testcase_17 AC 211 ms
326,992 KB
testcase_18 AC 217 ms
326,988 KB
testcase_19 AC 213 ms
327,108 KB
testcase_20 AC 218 ms
327,300 KB
testcase_21 AC 221 ms
326,988 KB
testcase_22 AC 215 ms
327,184 KB
testcase_23 AC 215 ms
327,088 KB
testcase_24 AC 213 ms
327,316 KB
testcase_25 AC 210 ms
327,108 KB
testcase_26 AC 212 ms
327,032 KB
testcase_27 AC 213 ms
326,980 KB
testcase_28 AC 213 ms
327,172 KB
testcase_29 AC 212 ms
327,052 KB
testcase_30 AC 211 ms
326,992 KB
testcase_31 AC 215 ms
327,032 KB
testcase_32 AC 214 ms
326,980 KB
testcase_33 AC 210 ms
327,176 KB
testcase_34 AC 211 ms
327,244 KB
testcase_35 AC 216 ms
327,028 KB
testcase_36 AC 218 ms
327,180 KB
testcase_37 AC 216 ms
327,180 KB
testcase_38 AC 220 ms
327,052 KB
testcase_39 AC 219 ms
327,028 KB
testcase_40 AC 218 ms
326,980 KB
testcase_41 AC 213 ms
326,976 KB
testcase_42 AC 212 ms
327,044 KB
testcase_43 AC 215 ms
327,056 KB
testcase_44 AC 220 ms
326,996 KB
testcase_45 AC 209 ms
327,052 KB
testcase_46 AC 215 ms
327,056 KB
testcase_47 AC 213 ms
327,112 KB
testcase_48 AC 213 ms
327,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v, w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

int C[10001][10001];

int main() {
	for (int i = 0; i <= 10000; i++) {
		C[i][0] = 1;
		for (int j = 1; j <= i; j++)
			C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % 1000000000;
	}
	ll N; int M; cin >> N >> M;
	N /= 1000;
	N -= N / M * M;
	cout << C[M][N] << endl;
}
0