結果
| 問題 |
No.604 誕生日のお小遣い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-19 00:02:18 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 296 bytes |
| コンパイル時間 | 2,056 ms |
| コンパイル使用メモリ | 191,868 KB |
| 最終ジャッジ日時 | 2025-01-07 14:14:20 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll a,b,c;
cin>>a>>b>>c;
ll l=1;
ll r=1e18+1;
while (r-l>1) {
ll m=(l+r)/2;
ll sum=m/a*b+m-m/a;
if (sum>=c) l=m;
else r=m;
}
cout<<l<<endl;
return 0;
}