結果

問題 No.1229 ラグビーの得点パターン
ユーザー rei564219
提出日時 2020-11-24 13:49:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 1,667 ms
コンパイル使用メモリ 165,932 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-23 18:36:09
合計ジャッジ時間 2,551 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 4 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(void){
  int a;
  cin >>a;
  int ans = 0;

  for(int i = 0;i<34;i++)
  {
    for(int j = 0;j<21;j++)
    {
      for(int k = 0;k<=j;k++)
      {
        if(i*3 + j*5 + k*2 == a&& j>=i)
        {
          ans++;
        }
      }
    }
  }

  cout << ans<<endl;
  return 0;
}

0