結果

問題 No.1229 ラグビーの得点パターン
ユーザー bonKotsu
提出日時 2020-11-14 00:39:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 345 bytes
コンパイル時間 1,651 ms
コンパイル使用メモリ 165,976 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 22:29:59
合計ジャッジ時間 2,635 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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

#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>

int main() {
  int N;
  cin >> N;

  int ans = 0;

  rep(i, 21) {
    rep(j, 51) {
      rep(k, 34) {
        if (j <= i && 5 * i + 2 * j + 3 * k == N) ans++;
      }
    }
  }

  cout << ans << endl;

}
0