pastebin

Paste Search Dynamic
Recent pastes
Try solve it
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. using ll = long long int;
  4. #define EasyPeasyLemonSqueezy ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  5.  
  6. void TRY_SOLVE_IT() {
  7.         ll x, y, k;
  8.     cin >> x >> y >> k;
  9.     ll ans = (((y * k) + k - 1) / (x - 1)) + ((((y * k) + k - 1) % (x - 1)) != 0) + k;
  10.     cout << ans << 'n';
  11. }
  12.  
  13. signed main() {
  14.     EasyPeasyLemonSqueezy
  15.     int test_cases;
  16.     cin >> test_cases;
  17.     for(int tc=1; tc<=test_cases; tc++){
  18.         TRY_SOLVE_IT();
  19.         }
  20. }
Parsed in 0.008 seconds