結果
| 問題 |
No.176 2種類の切手
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-04 18:31:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 331 bytes |
| コンパイル時間 | 668 ms |
| コンパイル使用メモリ | 67,432 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 16:08:41 |
| 合計ジャッジ時間 | 5,646 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 8 TLE * 2 |
ソースコード
#pragma GCC optimize "O3,omit-frame-pointer,inline"
#include <iostream>
using namespace std;
const int inf = 1e9+7;
int main() {
int a, b, t; cin >> a >> b >> t;
int y = inf;
for (int i = 0; i <= t; i += b) {
int x = i + (t - i + a-1)/a*a;
if (x < y) y = x;
}
cout << y << endl;
return 0;
}