結果

問題 No.523 LED
ユーザー hanorverhanorver
提出日時 2017-06-17 09:26:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 59,516 KB
最終ジャッジ日時 2024-04-08 17:21:16
合計ジャッジ時間 3,267 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 41 ms
53,460 KB
testcase_02 AC 47 ms
59,516 KB
testcase_03 AC 41 ms
53,460 KB
testcase_04 AC 42 ms
53,460 KB
testcase_05 AC 182 ms
59,516 KB
testcase_06 AC 42 ms
53,460 KB
testcase_07 AC 40 ms
53,460 KB
testcase_08 AC 41 ms
53,460 KB
testcase_09 AC 47 ms
59,516 KB
testcase_10 AC 40 ms
53,460 KB
testcase_11 AC 46 ms
59,516 KB
testcase_12 AC 45 ms
59,516 KB
testcase_13 AC 74 ms
59,516 KB
testcase_14 AC 44 ms
57,428 KB
testcase_15 AC 44 ms
59,516 KB
testcase_16 AC 46 ms
59,516 KB
testcase_17 AC 44 ms
59,516 KB
testcase_18 AC 181 ms
59,516 KB
testcase_19 AC 93 ms
59,516 KB
testcase_20 AC 88 ms
59,516 KB
testcase_21 AC 147 ms
59,516 KB
testcase_22 AC 162 ms
59,516 KB
testcase_23 AC 164 ms
59,516 KB
testcase_24 AC 47 ms
59,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n_led = int(input())
MOD7 = 1000000007
ans = 1
beki = n_led

for i in range(1, (2 * n_led) + 1):
    if i % 2 == 0 and beki != 0:
        ans = (ans * (i // 2)) % MOD7
        beki -= 1
    else:
        ans = (ans * i) % MOD7

print(ans)
0