Skip to content

Instantly share code, notes, and snippets.

@johndavedecano
Created October 1, 2017 06:42
Show Gist options
  • Save johndavedecano/1cc5e7aee1e095c9c2b6718ed2d17580 to your computer and use it in GitHub Desktop.
Save johndavedecano/1cc5e7aee1e095c9c2b6718ed2d17580 to your computer and use it in GitHub Desktop.
EXAMS - FROG JUMPS
function solution(x, y, d) {
const afterFirstJump = (85 - 10);
if (afterFirstJump % d == 0) {
return Math.floor(afterFirstJump / d);
}
return Math.floor(afterFirstJump / d + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment