結果

問題 No.129 お年玉(2)
ユーザー sugim48sugim48
提出日時 2015-01-16 23:29:54
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 218 ms / 5,000 ms
コード長 901 bytes
コンパイル時間 718 ms
コンパイル使用メモリ 79,508 KB
実行使用メモリ 236,800 KB
最終ジャッジ日時 2024-05-05 21:32:39
合計ジャッジ時間 12,028 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 218 ms
236,800 KB
testcase_01 AC 210 ms
236,672 KB
testcase_02 AC 213 ms
236,672 KB
testcase_03 AC 214 ms
236,800 KB
testcase_04 AC 210 ms
236,800 KB
testcase_05 AC 207 ms
236,672 KB
testcase_06 AC 207 ms
236,800 KB
testcase_07 AC 207 ms
236,672 KB
testcase_08 AC 201 ms
236,544 KB
testcase_09 AC 201 ms
236,672 KB
testcase_10 AC 202 ms
236,544 KB
testcase_11 AC 203 ms
236,544 KB
testcase_12 AC 201 ms
236,800 KB
testcase_13 AC 196 ms
236,800 KB
testcase_14 AC 199 ms
236,672 KB
testcase_15 AC 199 ms
236,672 KB
testcase_16 AC 197 ms
236,672 KB
testcase_17 AC 198 ms
236,672 KB
testcase_18 AC 199 ms
236,800 KB
testcase_19 AC 197 ms
236,544 KB
testcase_20 AC 203 ms
236,672 KB
testcase_21 AC 203 ms
236,672 KB
testcase_22 AC 203 ms
236,800 KB
testcase_23 AC 202 ms
236,672 KB
testcase_24 AC 202 ms
236,672 KB
testcase_25 AC 207 ms
236,672 KB
testcase_26 AC 204 ms
236,672 KB
testcase_27 AC 202 ms
236,672 KB
testcase_28 AC 214 ms
236,672 KB
testcase_29 AC 208 ms
236,672 KB
testcase_30 AC 204 ms
236,544 KB
testcase_31 AC 202 ms
236,800 KB
testcase_32 AC 207 ms
236,544 KB
testcase_33 AC 203 ms
236,544 KB
testcase_34 AC 204 ms
236,672 KB
testcase_35 AC 206 ms
236,672 KB
testcase_36 AC 208 ms
236,672 KB
testcase_37 AC 204 ms
236,672 KB
testcase_38 AC 210 ms
236,672 KB
testcase_39 AC 210 ms
236,672 KB
testcase_40 AC 202 ms
236,672 KB
testcase_41 AC 203 ms
236,800 KB
testcase_42 AC 207 ms
236,672 KB
testcase_43 AC 205 ms
236,544 KB
testcase_44 AC 202 ms
236,800 KB
testcase_45 AC 199 ms
236,672 KB
testcase_46 AC 202 ms
236,672 KB
testcase_47 AC 203 ms
236,672 KB
testcase_48 AC 201 ms
236,544 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