Cod sursa(job #2649979)
Utilizator | Data | 16 septembrie 2020 23:30:08 | |
---|---|---|---|
Problema | Flux maxim | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.43 kb |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--)
{
ll x, y, k;
cin >> x >> y >> k;
x--;
ll w = (k * y + k - 1), sol = 0;
if (w >= 1)
{
sol = (w + x - 1) / x;
}
cout << sol << "\n";
}
}