結果

問題 No.287 場合の数
ユーザー rlangevinrlangevin
提出日時 2023-09-21 12:17:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 5,000 ms
コード長 257 bytes
コンパイル時間 1,465 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 76,352 KB
最終ジャッジ日時 2023-09-21 12:17:11
合計ジャッジ時間 4,637 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
75,960 KB
testcase_01 AC 81 ms
76,020 KB
testcase_02 AC 83 ms
76,168 KB
testcase_03 AC 83 ms
76,212 KB
testcase_04 AC 81 ms
75,908 KB
testcase_05 AC 89 ms
76,208 KB
testcase_06 AC 80 ms
76,352 KB
testcase_07 AC 81 ms
75,960 KB
testcase_08 AC 80 ms
76,168 KB
testcase_09 AC 82 ms
76,196 KB
testcase_10 AC 81 ms
76,304 KB
testcase_11 AC 81 ms
76,196 KB
testcase_12 AC 80 ms
76,232 KB
testcase_13 AC 81 ms
76,280 KB
testcase_14 AC 80 ms
76,172 KB
testcase_15 AC 83 ms
76,324 KB
testcase_16 AC 82 ms
75,912 KB
testcase_17 AC 82 ms
76,172 KB
testcase_18 AC 81 ms
76,228 KB
testcase_19 AC 83 ms
76,308 KB
testcase_20 AC 82 ms
76,060 KB
testcase_21 AC 84 ms
76,320 KB
testcase_22 AC 82 ms
76,192 KB
testcase_23 AC 81 ms
76,296 KB
testcase_24 AC 80 ms
76,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M = 1000
A = [int(i <= N) for i in range(M)]

def pow2(L, M):
    new = [0] * M
    for i in range(M):
        for j in range(i + 1):
            new[i] += L[j] * L[i - j]
    return new

for _ in range(3):
    A = pow2(A, M)

print(A[6*N])
0