8 kyu
The falling speed of petals
4,069 of 17,246Uxie
Description:
When it's spring Japanese cherries blossom, it's called "sakura" and it's admired a lot. The petals start to fall in late April.
Suppose that the falling speed of a petal is 5 centimeters per second (5 cm/s), and it takes 80 seconds for the petal to reach the ground from a certain branch.
Write a function that receives the speed (in cm/s) of a petal as input, and returns the time it takes for that petal to reach the ground from the same branch.
Notes:
- The movement of the petal is quite complicated, so in this case we can see the velocity as a constant during its falling.
- Pay attention to the data types.
- If the initial velocity is non-positive, the return value should be
0
Algorithms
Similar Kata:
Stats:
Created | Nov 15, 2017 |
Published | Nov 15, 2017 |
Warriors Trained | 22991 |
Total Skips | 334 |
Total Code Submissions | 57377 |
Total Times Completed | 17246 |
C++ Completions | 4069 |
Python Completions | 5598 |
C# Completions | 1227 |
Ruby Completions | 561 |
JavaScript Completions | 6148 |
TypeScript Completions | 241 |
Julia Completions | 50 |
Total Stars | 113 |
% of votes with a positive feedback rating | 84% of 1912 |
Total "Very Satisfied" Votes | 1440 |
Total "Somewhat Satisfied" Votes | 342 |
Total "Not Satisfied" Votes | 130 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |