結果

問題 No.727 仲介人moko
ユーザー fine
提出日時 2018-08-24 21:59:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 7 ms / 1,000 ms
コード長 332 bytes
コンパイル時間 1,625 ms
コンパイル使用メモリ 165,648 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 07:21:20
合計ジャッジ時間 2,604 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const ll MOD = 1000000007;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    ll ans = 1;
    for (ll i = 1; i <= n; i++) {
        (ans *= i * i * (2 * i - 1) % MOD) %= MOD;
    }
    cout << ans << endl;
    return 0;
}
0