結果

問題 No.523 LED
ユーザー schwarzahlschwarzahl
提出日時 2017-06-02 23:10:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 224 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 2,633 ms
コンパイル使用メモリ 73,628 KB
実行使用メモリ 57,616 KB
最終ジャッジ日時 2023-10-22 01:34:40
合計ジャッジ時間 7,014 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
56,180 KB
testcase_01 AC 114 ms
57,384 KB
testcase_02 AC 127 ms
57,616 KB
testcase_03 AC 103 ms
56,152 KB
testcase_04 AC 112 ms
57,196 KB
testcase_05 AC 224 ms
57,152 KB
testcase_06 AC 122 ms
57,080 KB
testcase_07 AC 117 ms
57,412 KB
testcase_08 AC 116 ms
57,468 KB
testcase_09 AC 126 ms
57,556 KB
testcase_10 AC 116 ms
57,368 KB
testcase_11 AC 115 ms
57,524 KB
testcase_12 AC 114 ms
57,328 KB
testcase_13 AC 142 ms
57,464 KB
testcase_14 AC 115 ms
57,548 KB
testcase_15 AC 106 ms
55,764 KB
testcase_16 AC 118 ms
57,092 KB
testcase_17 AC 114 ms
57,096 KB
testcase_18 AC 212 ms
57,468 KB
testcase_19 AC 144 ms
56,244 KB
testcase_20 AC 153 ms
57,256 KB
testcase_21 AC 193 ms
57,588 KB
testcase_22 AC 206 ms
57,536 KB
testcase_23 AC 198 ms
57,116 KB
testcase_24 AC 123 ms
57,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Main main = new Main();
		main.solveC();
	}

	private void solveC() {
		Scanner sc = new Scanner(System.in);
		long ans = 1L;
		for (long i = sc.nextLong(); i > 0; i--) {
			ans = (((ans * i) % 1000000007L) * (2 * i - 1)) % 1000000007L;
		}
		System.out.println(ans);
	}
}
0