题目:3655. 楼层
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int ,int> PII;
const int N=1e5+10;
const int mod=100000007;
const double PI=acos(-1);
int main(){
int t;
cin>>t;
while(t--){
int n,x;
cin>>n>>x;
if(n<=2){
cout<<"1"<<endl;
continue;
}
n-=2;
cout<<(n+x-1)/x+1<<endl;
}
return 0;
}