結果

問題 No.1229 ラグビーの得点パターン
ユーザー kkkk97368086
提出日時 2021-11-24 14:43:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 1,452 ms
コンパイル使用メモリ 166,648 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 00:01:53
合計ジャッジ時間 2,444 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    
    int cnt=0;
    for(int t=0; t<=20; t++){
        for(int g=0; g<=t; g++){
            for(int p=0; p<=33; p++){
                if(5*t+2*g+3*p==n) cnt++;
            }
        }
    }
    cout << cnt << endl;
}
0