結果
問題 |
No.176 2種類の切手
|
ユーザー |
![]() |
提出日時 | 2015-05-25 09:40:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 535 bytes |
コンパイル時間 | 555 ms |
コンパイル使用メモリ | 70,156 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 03:21:55 |
合計ジャッジ時間 | 1,511 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 2 |
ソースコード
#include <cmath> #include <map> #include <string> #include <vector> #include <set> #include <algorithm> #include <iostream> using namespace std; #define repi(_I, _B, _E) for(int _I = (_B); (_I) < (_E); ++ (_I)) #define rep(_I, _N) for(int _I = 0; (_I) < (_N); ++ (_I)) #define all(_X) (_X).begin(), (_X).end() int a, b, t; int main() { cin >> a >> b >> t; int mi = 2000000000; for ( int y = 0; y < a && y * b < t + b; ++y ) { int x = (t - b * y + a - 1)/a; mi = min(mi, a * x + b * y); } cout << mi << endl; return 0; }