• Home
  • About
    • Che1's Blog photo

      Che1's Blog

      Che1's Dev Blog

    • Learn More
    • Facebook
    • Instagram
    • Github
    • Steam
    • Youtube
  • Posts
    • All Posts
    • Django
    • Python
    • Front-end
    • Algorithm
    • etc
    • All Tags
  • Projects

[Codility] Lv3 - FrogJmp

07 Apr 2018

Reading time ~1 minute

최종 답안

def solution(X, Y, D):
    if (Y - X) % D == 0:
        return (Y - X) // D
    else:
        return (Y - X) // D + 1

Reference

Codility



AlgorithmCodilityTime Complexity Share Tweet +1