結果

問題 No.1229 ラグビーの得点パターン
ユーザー polygon283
提出日時 2023-09-08 19:43:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-26 12:38:47
合計ジャッジ時間 1,781 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input()) 

def count_conbination(N): 
    count = 0
    max_T = N // 5 

    for T in range(max_T + 1):
        for C in range(T + 1):
            TC_sum = (5*T + 2*C)
            if (N - TC_sum) % 3 == 0 and (N - TC_sum) >= 0:
                count += 1
    
    return count

print(count_conbination(N))
0