結果
| 問題 |
No.176 2種類の切手
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-21 00:13:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 342 bytes |
| コンパイル時間 | 1,535 ms |
| コンパイル使用メモリ | 166,004 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-05 04:39:29 |
| 合計ジャッジ時間 | 2,802 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, t;
cin >> a >> b >> t;
int ans = INF;
for (int i = 0; i < a; i++) {
if (t < b * i) break;
int cnt = (t - b * i + a - 1) / a;
ans = min(ans, cnt * a + b * i);
}
cout << ans << endl;
return 0;
}