結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2015-07-01 00:46:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 281 bytes |
| コンパイル時間 | 1,026 ms |
| コンパイル使用メモリ | 157,648 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 21:32:58 |
| 合計ジャッジ時間 | 2,075 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)/(i+1));
}
cout<<ans<<endl;
return 0;
}
fiord