結果

問題 No.523 LED
ユーザー e869120e869120
提出日時 2017-06-02 22:24:14
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 366 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 64,340 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 20:56:22
合計ジャッジ時間 3,392 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 6 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 366 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 4 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 72 ms
4,348 KB
testcase_14 AC 3 ms
4,348 KB
testcase_15 AC 3 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 364 ms
4,348 KB
testcase_19 AC 130 ms
4,348 KB
testcase_20 AC 115 ms
4,348 KB
testcase_21 AC 272 ms
4,348 KB
testcase_22 AC 305 ms
4,348 KB
testcase_23 AC 305 ms
4,348 KB
testcase_24 AC 9 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
long long N, mod = 1000000007, r = 1;
int main() {
	cin >> N;
	for (int i = 1; i <= N * 2; i++)r *= i, r %= mod;
	for (int i = 1; i <= N; i++) {
		if (r % 2 == 1)r += mod; r /= 2;
	}
	cout << r << endl;
	return 0;
}
0