結果

問題 No.1229 ラグビーの得点パターン
ユーザー Jojikkkkk
提出日時 2020-10-10 00:58:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 486 ms
コンパイル使用メモリ 66,920 KB
最終ジャッジ日時 2025-01-15 06:04:54
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>

using namespace std;

int main(){
 int n,count=0;
 cin >> n;

 for(int i = 0; i < n/5+1; i++){
        for(int j = 0; j < i+1;j++){
            for(int k = 0;k< n/3+1;k++){
              if(i*5+j*2+k*3==n)
                count++;}}
  }
 cout << count << endl;
return 0;
}
0