結果

問題 No.129 お年玉(2)
ユーザー fal_rnd
提出日時 2017-01-01 13:24:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 1,692 ms
コンパイル使用メモリ 156,900 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-16 04:58:06
合計ジャッジ時間 3,034 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 46
権限があれば一括ダウンロードができます

ソースコード

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=1800,p=6;
	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