You are viewing a single comment's thread. Return to all comments →
Java
public static int solve(int a, int b, int d) { if(d == 0) return 0; if(d == b || d == a) return 1; if(d < 2 * b) return 2; return d/b + (d%b==0?0:1); }
Seems like cookies are disabled on this browser, please enable them to open this website
Baby Step, Giant Step
You are viewing a single comment's thread. Return to all comments →
Java