結果

問題 No.523 LED
ユーザー kyuna
提出日時 2019-08-20 00:24:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 69,104 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-05 13:10:32
合計ジャッジ時間 1,696 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int MOD = (int)1e9 + 7;

int main() {
    int n; cin >> n;
    long long ans = 1;
    for (int i = 1; i <= n; i++) {
        ans *= 1LL * i * (i * 2 - 1) % MOD;
        ans %= MOD;
    }
    cout << ans << endl;
    return 0;
}
0