結果
| 問題 |
No.1229 ラグビーの得点パターン
|
| コンテスト | |
| ユーザー |
iqueue02
|
| 提出日時 | 2020-09-18 22:03:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 477 bytes |
| コンパイル時間 | 2,256 ms |
| コンパイル使用メモリ | 192,176 KB |
| 最終ジャッジ日時 | 2025-01-14 17:12:43 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
int main() {
int n;
cin >> n;
int res = 0;
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= n; j++) {
for (int k = 0; k <= n; k++) {
if (i < k) continue;
if (i * 5 + j * 3 + k * 2 == n) res++;
}
}
}
cout << res << endl;
return 0;
}
iqueue02