結果
問題 |
No.1229 ラグビーの得点パターン
|
ユーザー |
![]() |
提出日時 | 2020-09-20 02:33:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 522 bytes |
コンパイル時間 | 875 ms |
コンパイル使用メモリ | 91,120 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 01:11:06 |
合計ジャッジ時間 | 1,820 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include<iostream> #include<stdio.h> #include<stdlib.h> #include<algorithm> #include<vector> #include<string.h> #include<math.h> #include<map> #include<iomanip> #include<queue> using ll = long long; const int inf = 99999999; const ll mod = 998244353; using namespace std; int main(){ int n; cin >> n; int ans = 0; for(int i = 0; i <= 30; i++){ for(int j = 0; j <= 30; j++){ for(int k = 0; k <= 40; k++){ if(5*i + 2*j + 3*k == n){ if(i>=j)ans++; } } } } cout << ans << endl; return 0; }