結果
| 問題 |
No.176 2種類の切手
|
| コンテスト | |
| ユーザー |
古寺いろは
|
| 提出日時 | 2015-04-02 23:25:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 326 bytes |
| コンパイル時間 | 1,228 ms |
| コンパイル使用メモリ | 159,212 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-08 01:24:38 |
| 合計ジャッジ時間 | 2,339 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 2 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
int main() {
long long A, B, T;
cin >> A >> B >> T;
long long ans = (long long)1e10;
for (int i = 0; i < 2000000 && A * (i - 1) < T; i++)
{
long long num = A * i;
num += ((T - num) / B) * B;
while (num < T) num += B;
ans = min(num, ans);
}
cout << ans << endl;
}
古寺いろは