結果
| 問題 | No.176 2種類の切手 |
| コンテスト | |
| ユーザー |
sio_puyo
|
| 提出日時 | 2015-04-03 02:58:12 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 293 bytes |
| 記録 | |
| コンパイル時間 | 849 ms |
| コンパイル使用メモリ | 174,724 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-24 11:27:22 |
| 合計ジャッジ時間 | 2,050 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int a,b,t;
int main(){
cin >> a >> b >> t;
int ans=1234567890;
for(int i=0;i<a;++i){
if(i*b>t) break;
if((t-i*b)%a==0) ans=t;
else ans=min(ans,i*b+((t-i*b)/a+1)*a);
}
cout << ans << endl;
return 0;
}
sio_puyo