int solution(int A, int B, int K) { // write your code in C++14 (g++ 6.2.0) //0 to b - 0 to a => a to b int c = (B/K)-(A/K); //check if divisible if(A%K==0) { c++; } return c; }
int solution(int A, int B, int K) { // write your code in C++14 (g++ 6.2.0) //0 to b - 0 to a => a to b int c = (B/K)-(A/K); //check if divisible if(A%K==0) { c++; } return c; }