#include #include #include #include using namespace std; typedef long long int ll; ll cnt[100010]; int main(){ ll l,r,n; cin >> l >> r >> n; ll left=l/n; ll right=r/n; ll c=0; if(right-left>1)c+=(right-left-1); for(ll i=l;;i++){ if(i%n==0)break; cnt[i%n]++; } for(ll i=r;;i--){ if(i!=r&&i%n==n-1)break; cnt[i%n]++; } for(int i=0;i