#include #include #include using namespace std; using lint=int64_t; lint L,R,N; lint LL,RR; map m; int main() { cin >> L >> R >> N; for(lint i=L;i<=L+N;i++) { if(i%N==0) { LL=i; break; } m[i%N]++; } for(lint i=R;i>=R-N;i--) { if(i%N==0) { RR=i; break; } m[i%N]++; } for(lint i=0;i