結果

問題 No.542 1円玉と5円玉
ユーザー teketeke5000teketeke5000
提出日時 2017-08-18 00:06:03
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 276 bytes
コンパイル時間 1,369 ms
コンパイル使用メモリ 157,956 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-14 13:59:56
合計ジャッジ時間 1,851 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(void) {
    int A,B,i,j;
    cin >> A >> B;
    for (i=0; i<=B; i++) for (j=0; j<=A; j++) {
        if (j == 5 && i != B) break;
        if (i + j == 0) continue;
        cout << i * 5 + j << endl;
    }
    return 0;
}
0