結果

問題 No.523 LED
ユーザー mitsuomitsuo
提出日時 2017-06-26 10:54:25
言語 Python2
(2.7.18)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 539 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 7,200 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-15 01:48:03
合計ジャッジ時間 15,104 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,816 KB
testcase_01 AC 12 ms
6,940 KB
testcase_02 AC 33 ms
6,944 KB
testcase_03 AC 12 ms
6,944 KB
testcase_04 AC 11 ms
6,940 KB
testcase_05 TLE -
testcase_06 AC 11 ms
6,944 KB
testcase_07 AC 11 ms
6,944 KB
testcase_08 AC 12 ms
6,944 KB
testcase_09 AC 19 ms
6,940 KB
testcase_10 AC 11 ms
6,944 KB
testcase_11 AC 12 ms
6,944 KB
testcase_12 AC 11 ms
6,944 KB
testcase_13 AC 506 ms
6,944 KB
testcase_14 AC 12 ms
6,944 KB
testcase_15 AC 13 ms
6,944 KB
testcase_16 AC 11 ms
6,940 KB
testcase_17 AC 13 ms
6,940 KB
testcase_18 TLE -
testcase_19 AC 936 ms
6,944 KB
testcase_20 AC 827 ms
6,940 KB
testcase_21 AC 1,972 ms
6,944 KB
testcase_22 TLE -
testcase_23 TLE -
testcase_24 AC 50 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

import math

# solve(2) = 1 * 2 * 3 * 4 / 2 * 2
# solve(3) = 1 * 2 * 3 * 4 * 5 * 6/ 2 * 2 * 2
# solve(4) = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 / 2 * 2 * 2 * 2






def solve2(n):
    c = []
    ans = 1
    for k in xrange(1, n + 1):
        ans *= k*(2*k - 1)
        ans %= 1000000007

    return ans


def solve(n):
    t = 1
    for k in xrange(1, n * 2 + 1):
        t *= k
        if k % 2 == 0:
            t /= 2
        t %= 1000000007
    return t

if __name__ == "__main__":
    print solve2(int(raw_input()))
0