結果

問題 No.1350 2019-6problem
ユーザー 👑 platinumplatinum
提出日時 2021-01-17 13:10:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 1,568 ms
コンパイル使用メモリ 167,296 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-07 01:41:58
合計ジャッジ時間 2,342 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 WA -
testcase_14 AC 2 ms
6,940 KB
testcase_15 AC 2 ms
6,944 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 WA -
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 1 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)

using namespace std;
using LL = long long;
using P = pair<int,int>;
const LL INF = 5e18;

int main(){
  LL A, B, K;
  cin >> A >> B >> K;
  LL left = 1, right = INF;
  while(right - left > 1){
  	LL mid = (left + right) / 2;
  	LL res = mid / A + mid / B - mid / (A * B);
  	if(res >= K) right = mid;
  	else left = mid;
  }
  cout << right << endl;

  return 0;
}
0