結果

問題 No.523 LED
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-06-15 02:34:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 461 ms / 2,000 ms
コード長 339 bytes
コンパイル時間 3,414 ms
コンパイル使用メモリ 73,044 KB
実行使用メモリ 56,500 KB
最終ジャッジ日時 2023-09-13 04:29:30
合計ジャッジ時間 9,857 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,820 KB
testcase_01 AC 127 ms
55,784 KB
testcase_02 AC 131 ms
55,984 KB
testcase_03 AC 123 ms
56,196 KB
testcase_04 AC 122 ms
55,700 KB
testcase_05 AC 450 ms
55,904 KB
testcase_06 AC 124 ms
56,080 KB
testcase_07 AC 121 ms
55,852 KB
testcase_08 AC 124 ms
56,404 KB
testcase_09 AC 130 ms
55,704 KB
testcase_10 AC 124 ms
54,004 KB
testcase_11 AC 125 ms
53,856 KB
testcase_12 AC 130 ms
55,840 KB
testcase_13 AC 194 ms
55,840 KB
testcase_14 AC 124 ms
55,752 KB
testcase_15 AC 125 ms
56,500 KB
testcase_16 AC 130 ms
55,468 KB
testcase_17 AC 126 ms
55,996 KB
testcase_18 AC 461 ms
55,824 KB
testcase_19 AC 245 ms
55,820 KB
testcase_20 AC 233 ms
55,728 KB
testcase_21 AC 377 ms
55,820 KB
testcase_22 AC 406 ms
55,880 KB
testcase_23 AC 405 ms
55,752 KB
testcase_24 AC 134 ms
55,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class No523{
	static long TMP = 1000000007;
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();

		long ans = 1;
		// answer is 2N!/2!^N
		for(long i = N; i > 0; i--){
			ans = (ans*i)%TMP;
			ans = (ans*(2*i-1))%TMP;
		}
		System.out.println(ans);
	}
}
0