結果

問題 No.129 お年玉(2)
ユーザー zuvizudarzuvizudar
提出日時 2017-06-18 12:51:05
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,087 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 88,464 KB
実行使用メモリ 7,424 KB
最終ジャッジ日時 2024-04-09 19:33:01
合計ジャッジ時間 7,038 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>
 
using namespace std;
 
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define F(i,j,k) fill(i[0],i[0]+j*j,k)
#define P(p) cout<<(p)<<endl;
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define INF 1<<25
#define pb push_back
 
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int,int> pii;
typedef pair<long,long> pll;
typedef long long ll;

int main(){
	ll N,M;
	int mod=1<<10;
	cin>>N>>M;
	int pascal[1001][1001];
	for(int i=0;i<=1000;i++){
		for(int j=0;j<=i;j++){
			if(j==0)pascal[i][j]=1;
			else
				pascal[i][j]=(pascal[i-1][j]+pascal[i-1][j-1])%mod;
		}
	}
	int amari=N/1000%M;
	cout<<pascal[M][amari]<<endl;
	return 0;
}
0