結果
| 問題 |
No.176 2種類の切手
|
| コンテスト | |
| ユーザー |
sio_puyo
|
| 提出日時 | 2015-04-03 02:51:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 291 bytes |
| コンパイル時間 | 1,389 ms |
| コンパイル使用メモリ | 157,392 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-08 02:58:48 |
| 合計ジャッジ時間 | 1,939 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 7 WA * 22 |
ソースコード
#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,t+((t-i*b)/a+1)*a);
}
cout << ans << endl;
return 0;
}
sio_puyo