結果
問題 | No.1229 ラグビーの得点パターン |
ユーザー |
|
提出日時 | 2020-09-18 21:38:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 580 bytes |
コンパイル時間 | 1,928 ms |
コンパイル使用メモリ | 191,776 KB |
最終ジャッジ日時 | 2025-01-14 16:38:52 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h>using namespace std;#include <math.h>#include <iomanip>template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }const int INF=1001001001;const int mod=1e9+7;int main(){int N;cin>>N;int cnt=0;for(int i=0;i<=20;i++){for(int j=0;j<=50;j++){for(int k=0;k<=40;k++){if(j>i){continue;}if(5*i+2*j+3*k==N){cnt++;}}}}cout<<cnt<<endl;return 0;}