結果
| 問題 | No.542 1円玉と5円玉 |
| コンテスト | |
| ユーザー |
kyabaria
|
| 提出日時 | 2018-09-11 18:42:17 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 514 bytes |
| 記録 | |
| コンパイル時間 | 951 ms |
| コンパイル使用メモリ | 186,136 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-09 02:20:44 |
| 合計ジャッジ時間 | 1,656 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 5 |
ソースコード
#include <bits/stdc++.h>
typedef long long ll;
#define INF 1000000000
#define MOD 1000000007
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
vector<int>res;
for(int i=0;i<=a;i++){
for(int j=0;j<=b;j++){
int sum=i+j*5;
if(sum!=0){
res.push_back(sum);
}
}
}
res.erase(unique(res.begin(), res.end()), res.end());
sort(res.begin(),res.end());
for(int i=0;i<res.size();i++){
cout<<res[i]<<endl;
}
}
kyabaria