結果
問題 | No.542 1円玉と5円玉 |
ユーザー |
![]() |
提出日時 | 2019-12-31 02:36:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 1,555 ms |
コンパイル使用メモリ | 165,260 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 03:25:10 |
合計ジャッジ時間 | 2,247 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int a, b; cin >> a >> b; for (int i = 1; i <= a + 5 * b; i++) { int t = i; t -= min(5 * (t / 5), 5 * b); if (t <= a) { cout << i << endl; } } return 0; }