結果
問題 | No.523 LED |
ユーザー |
![]() |
提出日時 | 2017-06-02 22:59:17 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 110 ms / 2,000 ms |
コード長 | 361 bytes |
コンパイル時間 | 1,290 ms |
コンパイル使用メモリ | 66,356 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 23:55:12 |
合計ジャッジ時間 | 2,011 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> using namespace std; int main() { int n; cin >> n; int ans = 1; const int mod = 1e9 + 7; for (int i = 1; i <= n; i++) { ans = 1LL * ans * i % mod; ans = 1LL * ans * (i * 2 - 1) % mod; } cout << ans << endl; }