結果
| 問題 |
No.542 1円玉と5円玉
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-07 18:35:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 398 bytes |
| コンパイル時間 | 629 ms |
| コンパイル使用メモリ | 62,420 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 04:51:45 |
| 合計ジャッジ時間 | 1,126 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <set>
using namespace std;
int main(int argc, char* argv[])
{
int A,B;
cin>>A>>B;
set<int> aSet;
int i;
for (i=1;i<=A;i++){
aSet.insert(i);
}
for (i=1;i<=B;i++){
int x=i*5;
aSet.insert(x);
for (int j=1;j<=A;j++){
x++;
aSet.insert(x);
}
}
set<int>::iterator sit;
for (sit=aSet.begin();sit!=aSet.end();sit++){
cout<<*sit<<endl;
}
return 0;
}