#include using namespace std; typedef long long ll; #define FOR(I,A,B) for(int I = int(A); I < int(B); ++I) #define FORR(I,A,B) for(ll I = ll((B)-1); I >= ll(A); --I) const ll MOD=1000000007LL; #define out(a) cout<> T; FORR(t,0,T){ ll d,A,B; cin >> d >> A >> B; ll ans = f(B,d) - f(A-1,d); cout << ans << endl; } }