// you can also use imports, for example:
// import java.util.*;

// you can write to stdout for debugging purposes, e.g.
// System.out.println("this is a debug message");

class Solution {
    public int solution(int A, int B, int K) {
        // write your code in Java SE 11
        double a = (double) A / K;
        int b = B / K;
        int c = (int) Math.ceil(a);

        return b - c + 1;
    }
}

코딜리티 CountDiv 문제 풀이 Java 소스 코드

+ Recent posts