結果

問題 No.1229 ラグビーの得点パターン
ユーザー warm4C0
提出日時 2023-05-07 18:09:26
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 1,683 ms
コンパイル使用メモリ 158,692 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 17:46:27
合計ジャッジ時間 2,247 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

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

	int ans = 0;
	for (int t = 0; t <= 20; t++) {
		for (int g = 0; g <= min(50, t); g++) {
			for (int pg = 0; pg <= 33; pg++) {
				ans += (t*5 + g*2 + pg*3 == n);
			}
		}
	}

	cout << ans << endl;

	return 0;
}
0