結果

問題 No.523 LED
ユーザー face4face4
提出日時 2018-07-13 22:06:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 347 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 65,544 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 05:08:49
合計ジャッジ時間 3,476 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

typedef long long ll;

ll mod = 1000000007;

int main(){
    ll n;
    cin >> n;

    ll ans = 1;
    for(ll i = 2*n; i >= 1; i--){
        ans *= i;
        if(i%2 == 0)    ans /= 2;
        ans %= mod;
    }

    cout << ans << endl;
    return 0;
}
0