#include #include #include #include #include #include #include using namespace std; int main(){ long long l,r; int n; cin >> l >> r >> n; vector mo; for(long long i=l;i<=r;i++){ if(i==l){ mo.push_back(i%n); continue; }else{ if(mo[0]==i%n){ break; }else{ mo.push_back(i%n); } } } vector cnt(mo.size(),(r-l+1)/mo.size()); long long add=(r-l+1)%mo.size(); for(long long i=0;i