結果

問題 No.523 LED
ユーザー picakun
提出日時 2017-06-06 23:47:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 536 bytes
コンパイル時間 634 ms
コンパイル使用メモリ 66,488 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 11:53:40
合計ジャッジ時間 1,886 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<iomanip>
#define RREP(i,s,e) for (i = s; i >= e; i--)
#define rrep(i,n) RREP(i,n,0)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 100000000
#define Mod 1000000007
using namespace std;


int main(){
	int n;
	cin >> n;
	int i;
	long temp;
	long long ans = 1;
	for(i = 1; i <= n; i++){
		temp = 2 * i - 1;
		ans = ((ans%Mod) * (i%Mod))%Mod;
		ans = ((ans%Mod) * (temp%Mod))%Mod;
	}

	cout << ans <<endl;

	return 0;
}


0