結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-24 02:46:03 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 368 bytes |
| コンパイル時間 | 2,346 ms |
| コンパイル使用メモリ | 191,976 KB |
| 最終ジャッジ日時 | 2025-01-07 14:49:16 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 25 MLE * 17 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int mod=1e9;
ll n,m;
cin>>n>>m;
n/=1000;
n%=m;
ll c[m+1][m+1];
for (int i=0;i<=m;i++)
c[i][0]=c[i][i]=1;
for (int i=2;i<m;i++)
for (int j=1;j<i;j++)
c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod;
cout<<c[m][n]<<endl;
return 0;
}