結果

問題 No.727 仲介人moko
ユーザー kappybarkappybar
提出日時 2020-04-26 18:20:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 436 bytes
コンパイル時間 1,740 ms
コンパイル使用メモリ 165,648 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-17 16:38:30
合計ジャッジ時間 2,159 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll =  long long ;
using P = pair<int,int> ;
const int INF = 1e9;
const int MOD = 1000000007;

int main(){
    int n;
    cin >> n;
    ll A = 1,B = 1;
    for(ll i=1;i<=2*n;i++){
        if(i <= n) A = (A * i)%MOD;
        
        if(i%2 == 0) B = (B * i/2)%MOD;
        else B = (B * i)%MOD;
    }
    cout << (A*B)%MOD << endl;
    return 0;
}
0