結果

問題 No.287 場合の数
ユーザー titiatitia
提出日時 2022-10-08 02:45:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 506 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 1,753 ms
コンパイル使用メモリ 86,816 KB
実行使用メモリ 77,028 KB
最終ジャッジ日時 2023-09-03 21:03:58
合計ジャッジ時間 8,190 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 298 ms
76,848 KB
testcase_01 AC 73 ms
71,516 KB
testcase_02 AC 80 ms
76,224 KB
testcase_03 AC 506 ms
76,972 KB
testcase_04 AC 491 ms
76,836 KB
testcase_05 AC 299 ms
76,744 KB
testcase_06 AC 84 ms
76,480 KB
testcase_07 AC 128 ms
76,520 KB
testcase_08 AC 187 ms
76,548 KB
testcase_09 AC 311 ms
76,876 KB
testcase_10 AC 492 ms
76,532 KB
testcase_11 AC 107 ms
76,344 KB
testcase_12 AC 417 ms
76,924 KB
testcase_13 AC 91 ms
76,448 KB
testcase_14 AC 143 ms
76,948 KB
testcase_15 AC 289 ms
76,900 KB
testcase_16 AC 152 ms
76,804 KB
testcase_17 AC 383 ms
76,852 KB
testcase_18 AC 124 ms
76,472 KB
testcase_19 AC 341 ms
76,760 KB
testcase_20 AC 169 ms
76,556 KB
testcase_21 AC 306 ms
76,764 KB
testcase_22 AC 286 ms
76,824 KB
testcase_23 AC 229 ms
77,028 KB
testcase_24 AC 146 ms
76,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())

X=[0]*(n*4+1)

for a in range(n+1):
    for b in range(n+1):
        for c in range(n+1):
            for d in range(n+1):
                X[a+b+c+d]+=1
                
ANS=0

for i in range(len(X)):
    k=6*n-i

    if k<len(X):
        ANS+=X[i]*X[k]

print(ANS)
0