結果

問題 No.542 1円玉と5円玉
ユーザー bin101
提出日時 2019-11-01 01:16:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 772 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 73,040 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 22:13:56
合計ジャッジ時間 1,409 ms
ジャッジサーバーID
(参考情報)
judge4 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
#include <cmath>
#include <limits>
#include <iostream>
#include<set>
#include<tuple>
using namespace std;
#define INF 11000000000
#define MAX 100000
#define MOD 1000000007
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> p;
typedef pair< pair<int,int>, int> p; 
#define bit(n,k) ((n>>k)&1) /*nのk bit目*/
#define rad_to_deg(rad) (((rad)/2/M_PI)*360)

int C[110000];

int main(){
    C[0]=1;
    int A,B;
    cin>>A>>B;
    for(int i=0;i<=B;i++){
        for(int j=0;j<=A;j++){
            int x=j+i*5;
            if(C[x]==0){
                C[x]++;
                cout<<x<<endl;
            }
        }
    }
}

0