結果
| 問題 |
No.1229 ラグビーの得点パターン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-18 21:36:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 637 bytes |
| コンパイル時間 | 550 ms |
| コンパイル使用メモリ | 74,688 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-22 09:08:04 |
| 合計ジャッジ時間 | 1,458 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <map>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < int(n);i++)
const ll mod = 1e9+7;
int main(){
int n;
cin >> n;
int cnti=0,cntj = 0;
int res = 0;
for (int i = 0; i <= 100;i+=5){
for (int j = 0; j <= 100; j+=2){
for (int k = 0; k <= 100;k+=3){
//cout << cnti << " " << cntj << endl;
if (i/5 < j/2) continue;
if (i+j+k == n) res++;
//cout << "i,j,k " << i << " " << j << " " << k << endl;
}
}
}
cout << res << endl;
return 0;
}