結果

問題 No.523 LED
ユーザー kohei2019kohei2019
提出日時 2022-02-06 17:05:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 279 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 76,248 KB
最終ジャッジ日時 2023-09-02 07:01:48
合計ジャッジ時間 4,607 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,608 KB
testcase_01 AC 71 ms
71,316 KB
testcase_02 AC 76 ms
75,944 KB
testcase_03 AC 68 ms
71,548 KB
testcase_04 AC 71 ms
71,444 KB
testcase_05 AC 279 ms
76,124 KB
testcase_06 AC 70 ms
71,604 KB
testcase_07 AC 68 ms
71,596 KB
testcase_08 AC 69 ms
71,600 KB
testcase_09 AC 74 ms
76,144 KB
testcase_10 AC 69 ms
71,600 KB
testcase_11 AC 71 ms
75,852 KB
testcase_12 AC 72 ms
76,036 KB
testcase_13 AC 113 ms
76,160 KB
testcase_14 AC 72 ms
75,864 KB
testcase_15 AC 73 ms
75,948 KB
testcase_16 AC 72 ms
76,036 KB
testcase_17 AC 72 ms
75,916 KB
testcase_18 AC 277 ms
75,956 KB
testcase_19 AC 146 ms
76,248 KB
testcase_20 AC 138 ms
75,872 KB
testcase_21 AC 226 ms
75,876 KB
testcase_22 AC 245 ms
76,136 KB
testcase_23 AC 245 ms
75,864 KB
testcase_24 AC 79 ms
76,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
mod = 1000000007

def invmod(a,mod):#mod逆元
    if a == 0:
        return 0
    if a == 1:
        return 1
    return (-invmod(mod % a, mod) * (mod // a)) % mod

inv2 = invmod(2,mod)

ans = 1

for i in range(1,2*N+1):
    ans *= i
    ans %= mod

for i in range(N):
    ans *= inv2
    ans %= mod

print(ans)
0