1 条题解
-
0
#include <bits/stdc++.h> using namespace std; void solve(){ int n,k; cin >> n >> k; int ans = k + k/(n-1) ; if(k % (n-1)){ cout << ans << endl; }else{ cout << ans - 1 << endl; } } signed main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int T = 1; cin >> T; while(T--){ solve(); } return 0; }
- 1
信息
- ID
- 482
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 59
- 已通过
- 12
- 上传者