結果

問題 No.129 お年玉(2)
ユーザー たこしたこし
提出日時 2015-01-27 13:27:49
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 935 bytes
コンパイル時間 896 ms
コンパイル使用メモリ 89,864 KB
実行使用メモリ 42,828 KB
最終ジャッジ日時 2023-09-05 07:05:10
合計ジャッジ時間 3,260 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 10 ms
42,460 KB
testcase_03 AC 10 ms
42,508 KB
testcase_04 AC 10 ms
42,464 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 10 ms
42,448 KB
testcase_30 AC 9 ms
42,464 KB
testcase_31 AC 10 ms
42,504 KB
testcase_32 WA -
testcase_33 AC 10 ms
42,540 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <queue>
#include <complex>

#define INF 1145141919
#define EPS 1e-9
#define Pi acos(-1)

using namespace std;

typedef long long ll;

ll N, M;

int paskal[10001][10001];

int main(){

	cin >> N;
	cin >> M;

	paskal[1][0] = paskal[1][1] = 1;

	for (int i = 2; i <= 1000; i++){
		for (int j = 0; j <= i; j++){
			if (j == 0)
				paskal[i][j] = 1;
			else
				paskal[i][j] = paskal[i - 1][j - 1] + paskal[i - 1][j];
		}
	}

	ll num = N / M / 1000 * 1000;

	num = (N - num*M)/1000;

	cout << paskal[M][num] << endl;

	return 0;

}
0