結果
問題 | No.542 1円玉と5円玉 |
ユーザー | pekempey |
提出日時 | 2017-07-16 17:56:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 250 bytes |
コンパイル時間 | 534 ms |
コンパイル使用メモリ | 69,468 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 04:23:50 |
合計ジャッジ時間 | 1,103 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> int main() { int A, B; std::cin >> A >> B; while (A - 5 >= 5) { B++; A -= 5; } for (int i = 1; i <= A + B * 5; i++) { if (i % 5 <= A) { std::cout << i << std::endl; } } }