結果

問題 No.129 お年玉(2)
ユーザー fal_rnd
提出日時 2017-01-01 13:27:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 378 bytes
コンパイル時間 1,694 ms
コンパイル使用メモリ 166,400 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-16 04:58:09
合計ジャッジ時間 2,819 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 45
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const char en='\n';
const int mod=1000000007;
int main(){
	cin.tie();
	ios::sync_with_stdio(false);

	ll m,p,MOD=1000000000;
	ll r=1;
	cin>>m>>p;

	m=9999999999999999,p=10000;
	m=m/1000%p;

	for(int i=p;i>m;i--){
		r*=i;
		r%=MOD;
	}
	for(int i=p-m;i>1;i--){
		r/=i;
		r%=MOD;
	}
	cout<<r<<en;
	return 0;
}
0