結果
| 問題 |
No.542 1円玉と5円玉
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-02 16:27:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 383 bytes |
| コンパイル時間 | 2,968 ms |
| コンパイル使用メモリ | 197,772 KB |
| 最終ジャッジ日時 | 2025-01-10 20:36:08 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0),ios::sync_with_stdio(false);
int a,b; cin>>a>>b;
vector<int>v((a+1)*(b+1));
for(int one=0;one<=a;++one){
for(int five=0;five<=b;++five){
v.at(one*(b+1)+five)=one+five*5;
}
}
sort(v.begin(),v.end());
v.erase(unique(v.begin(),v.end()),v.end());
for(auto i=v.begin()+1;i!=v.end();++i)cout<<*i<<"\n"s;
}