题目:http://codeforces.com/problemset/problem/1066/A
作为一道div3的A,用总的灯笼数量减去被覆盖的灯笼数量就行了。
code:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
ll L, v, l, r;
cin >> L >> v >> l >> r;
ll ans = L / v;
ans -= r / v - (l - 1) / v;
cout << ans << endl;
}
return 0;
}