結果
| 問題 | No.542 1円玉と5円玉 |
| コンテスト | |
| ユーザー |
Manuel1024
|
| 提出日時 | 2022-03-31 21:38:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 430 bytes |
| コンパイル時間 | 682 ms |
| コンパイル使用メモリ | 75,736 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 13:47:06 |
| 合計ジャッジ時間 | 1,372 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int a, b; cin >> a >> b;
vector<int> ans;
for(int i = 0; i <= a; i++){
for(int j = 0; j <= b; j++){
if(i+j*5 > 0) ans.emplace_back(i+j*5);
}
}
sort(ans.begin(), ans.end());
ans.erase(unique(ans.begin(), ans.end()), ans.end());
for(auto &it: ans) cout << it << '\n';
return 0;
}
Manuel1024