結果
問題 | No.542 1円玉と5円玉 |
ユーザー |
![]() |
提出日時 | 2017-07-14 22:40:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 436 ms |
コンパイル使用メモリ | 40,320 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-07 23:16:46 |
合計ジャッジ時間 | 1,008 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include<cstdio>#include<set>using namespace std;int main(void){int m, n;while(scanf("%d%d", &m, &n)==2){set<int> s;for(int i=0;i<=m;i++){for(int j=0;j<=n;j++){if(i==0 && j==0) continue;s.insert(i+j*5);}}for(auto v:s){printf("%d\n", v);}}return 0;}