結果
問題 | No.542 1円玉と5円玉 |
ユーザー | hanorver |
提出日時 | 2017-07-14 22:24:48 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 3,455 bytes |
コンパイル時間 | 898 ms |
コンパイル使用メモリ | 88,028 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-07 22:34:51 |
合計ジャッジ時間 | 1,640 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 2 ms
6,820 KB |
testcase_02 | AC | 2 ms
6,820 KB |
testcase_03 | AC | 2 ms
6,816 KB |
testcase_04 | AC | 2 ms
6,820 KB |
testcase_05 | AC | 2 ms
6,816 KB |
testcase_06 | AC | 3 ms
6,820 KB |
testcase_07 | AC | 3 ms
6,816 KB |
testcase_08 | AC | 3 ms
6,816 KB |
testcase_09 | AC | 2 ms
6,816 KB |
testcase_10 | AC | 2 ms
6,820 KB |
testcase_11 | AC | 1 ms
6,820 KB |
testcase_12 | AC | 2 ms
6,816 KB |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <map> #include <stack> #include <queue> #include <cstdlib> #include <numeric> /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::'''```````::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::''`_,-''.,... `:::::::::::::::::: :::::::::::::::::::::::::::::::::::::' _,-',;;!!!!!!!!!; `:::::::::::::::: ::::::::::::::'`````:::::::::::::'' .-' ;<!!!!!!!'''`_..' `::::::::::::::: ::::::::::'' ,;!!!;,`::::::::::' .-`.,,,zcccc,,cccd$$"",;> `:::::::::::::: :::::::::' ;!!!!!!!!; ``:::::' ;' ,c$$$$$$$$$$$CC<<" ````_ :::::::::::::: :::::::' ;!!!!!!!!!!!!!; ' ;! z$$$$$$$$$$$$$$$$$$$$$$??". :::::::::::::: ::::::: <!!!!!!!!!!!!!' . .!',c$$$$$$$$$$$$$c, `"""',;;<!! :::::::::::::: :::::: ,!!!!!!!!!!!'`,;! .<! ,$$$$$$$$$$$$$$$$hc,,,..- !!!! `::::::::::::: ::::' <!!!!!!!!!' .<!!!;!! ,$$$$$""???$$$"""?????"" .<!!!! :::::::::::::: ::: ;><!!!!!!!!! ,<!!!!!!!',c, "??.< . "??h. -;;;;!!!!!!!' :::::::::::::: ::: !!!!!!!!!!' ;!!!!!!!!' d$$h.`$ccr,$h `;,." `!!!!!!!!! ::::::::::::::: :::.`<!!!!!!!' !!!!!!!!!! dP"""?.`$$F`$$h.`!!!!!!!!!!!!!! .::::::::::::::: ::::. <!!!!!! !!!!!!!!!! ,$ .nn.' "$$ P" <!!!!!!!!!!!' .:::::::::::::::: :::::. <!!!! ;!!!!!!!!!! $$ MMMMx ?$ ,dx `!!!!!!!!!!' :::::::::::::::::: ```:::: `!!! !!!'!!!!!! `$ MMMMMM, $r MMMr !!!!!!!!' .::::::::::::::::::: `!!;,.`' ``' ``,;!!!!' ch." 4MMMMMM "$ 4MMM `!!!!!' ..:::::::::::::::::::: !!!!!'````'``<!!!'`.z$$$$. MMMMMMb $h MMM `!!'' .::::::::::::::::::::::: ..``.,d$$$$$c,,,. $$$$$F"? "MMMMMM $$ 4P" ' . :::::::::::::::::::::::::: dM""..""?$$$$$$$$$$$$$$$$$$c "MM" $$>` ,c `::::::::::::::::::::::::: MMn.`"?hc,d$$$$$$$$$$$$$$$$$$. `P $P' -??P== `::::::::::::::::::::::: MMMMMnx`"?$$$$$$$$$$$P".,.`"??$ccccc$.z$$$$. `' .:::::::::::::::::' '' MMMMMM,' .?$$$$$$$$$$ d$$$ d$$$$$$$$$$$$$h..``::::::::::::::::' MMMMMMMn `?$$$$$$$$$$,.?$$h. =."?$$$$$$$$$$$$$$hc,.``'::::::::::' MMMMMMMM ;, `"??$$$$$$h ?$$h. -m,``""??$$$$$$$$$$$$$c,.``````' MMMMMMM> !!! ?cc,.,d$$$$h.`"?$hc `P .`"?$$$$$$$$$$$$$$$$$$$ .: MMMMMMM ,!!'. $$$$$$$$$??=== `"""=c, " P n. "$$$$$$$$$$$$$$$$c_ ,.:::: MMMMMMP !!! Mr<$$$$"".,c,;M ;<!! ..""=_ ' 4 .br .`""??$$$$$$$$??"".::::::: MMMMMM';!!',M>'$$$$$$$$$>4M `!!! 4MMbn.`"=cc," -'P",c=.,.`.. .= ::::::::: MMMMM' !!! dMb $$$$$$$$P MM> !!! 4MMMMMMr :..`"-._""Pr4"'-P" .,.`::::::::: MMMM' <!!!,MMM "$$$$$$P dMM>;!!! 4MMMMMMb :::::.. "-=cczyycc??" .::::::::: MMMP <!!! dMMMb "?$$P" uMMM>;!!! 4MMMMMMMr`:::::::::.........::::::::::::: MMP';!!! ;MMMMMMn,.".uMMMMM ;!!! MMMMMMMMM,`:::::::::::::::::::::::::::::: MM ;!!!! MMMMMMMMMMMMMMMMMM !!!! MMMMMMMMMb `::::::::::::::::::::::::::::: M" !!!! uMMMMMMMMMMMMMMMMMP !!! ;MMMMMMMMMMx ::::::::::::::::::::::::::::: P.!!!! ,MMMMMMMMMMMMMMMMMM ,!!! MMMMMMMMMMMMx`:::::::::::::::::::::::::::: !!!!> MMMMMMMMMMMMMMMMMMP !!!',MMMMMMMMMMMMM `::::::::::::::::::::::::::: */ int main() { long long a, b; std::cin >> a >> b; std::vector<int> ans; for (int i = 0; i <= a; i++) { for (int j = 0; j <= b; j++) { ans.push_back(i + j * 5); } } std::sort(ans.begin(), ans.end()); ans.erase(std::unique(ans.begin(), ans.end()), ans.end()); for (int i = 1; i < ans.size(); i++) { std::cout << ans[i] << std::endl; } return 0; }