結果

問題 No.1229 ラグビーの得点パターン
ユーザー _youte_ne
提出日時 2021-04-16 01:26:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 65,332 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-02 09:01:53
合計ジャッジ時間 1,320 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
  int N,T = 5,G = 2,PG = 3;
  cin >> N;
    int num =0;
    for(int i=0; i <= N; ++i){
        for(int j=0; j <= i; ++j){
            for(int k=0;k < N;++k){
                if((i*T) + (j*G) + (k*PG) == N ){
                    ++num;     
                }
            }
        }
    }
    cout << num << endl;
}
0