Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?

book
Minimum Steps to Visit a Friend

Bill decided to visit his friend. It turned out that the Bill's house is located at point 0 and his friend's house is located at point x (x > 0) of the coordinate line. In one step Bill can move 1, 2, 3, 4 or 5 positions forward.

Given integer x, return the minimum number of steps Bill needs to make in order to get to his friend's house.

Example 1

Input:

12

Output:

3

Example 2

Input:

41

Output:

9
main.cpp

main.cpp

cpp

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt