結果
問題 | No.1229 ラグビーの得点パターン |
ユーザー | yuui |
提出日時 | 2020-09-18 21:28:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 1,659 ms |
コンパイル使用メモリ | 191,980 KB |
最終ジャッジ日時 | 2025-01-14 16:27:28 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { ll N; cin >> N; ll ans = 0; rep(i, 100) rep(j, i + 1) rep(k, 100) { if (i * 5 + j * 2 + k * 3 == N) { ans++; } } cout << ans << endl; return 0; }