/* https://yukicoder.me/problems/no/810 */ #include #include /* {{{ Variables */ int L, R, M; /* }}} */ int main(int argc, char *argv[]) { /* {{{ Input */ std::cin >> L >> R >> M; /* }}} */ /* {{{ Output */ int tmp = (R-L+1)/M; if (tmp == 0) { tmp = (R-L+1)%M; } std::cout << tmp << std::endl; /* }}} */ return 0; }