結果
| 問題 | No.3394 Big Binom |
| コンテスト | |
| ユーザー |
tau1235
|
| 提出日時 | 2025-12-02 02:24:01 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 390 bytes |
| 記録 | |
| コンパイル時間 | 2,949 ms |
| コンパイル使用メモリ | 278,180 KB |
| 実行使用メモリ | 15,944 KB |
| 最終ジャッジ日時 | 2025-12-02 02:24:20 |
| 合計ジャッジ時間 | 13,560 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 15 TLE * 5 -- * 1 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/modint>
using namespace std;
int main(){
using ll=long long;
using mint=atcoder::modint998244353;
ll mod=998244353;
ll n,k;
cin>>n>>k;
k=min(k,n-k);
mint ans=1;
if (n>=mod&&mod>n-k) ans=0;
else{
mint fact=1;
for (int i=1;i<=k;i++) fact*=i;
for (int i=n;i>n-k;i--) ans*=i;
ans/=fact;
}
cout<<ans.val()<<endl;
}
tau1235