結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2015-07-01 00:44:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 283 bytes |
| コンパイル時間 | 1,328 ms |
| コンパイル使用メモリ | 159,472 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 21:32:44 |
| 合計ジャッジ時間 | 2,240 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 41 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define E 1000000000
int main(){
ll n,m; cin>>n>>m;
n/=1000;
n%=m;
//mCnを求めれば良い
ll ans=1;
if(n>m/2) n=m-n;
for(int i=0;i<n;i++){
ans=(ans*(m-i)/(n-i))%E;
}
cout<<ans<<endl;
return 0;
}
fiord