7 kyu
A snail enters a bar!
219 of 1,470Wizardll
Description:
Problem Description:
A snail is crawling along a rubber band that has an initial length of x
units. The snail moves at a constant speed of y
units per minute. As the snail crawls from the left end of the rubber band to the right end, the rubber band increases in length from the right side every minute
, adding z
units to its length.
The question is: Will the snail be able to reach the right end of the rubber band within 1 year
?
Parameters:
x
: Initial length of the rubber band (in units), where0.01 ≤ x ≤ 1,000,000
.y
: Speed of the snail (in units per minute), where0.01 ≤ y ≤ 1,000,000
.z
: Amount by which the rubber band increases in length every minute (in units), where0.01 ≤ z ≤ 1,000,000
.
Examples:
Example 1:
- Initial length of the rubber band:
x = 10
units - Speed of the snail:
y = 2
units/minute - Increase rate of the rubber band:
z = 1
unit/minute - Outcome:
True
(The snail will reach the end in10
minutes.)
- Initial length of the rubber band:
Example 2:
- Initial length of the rubber band:
x = 100
units - Speed of the snail:
y = 1
unit/minute - Increase rate of the rubber band:
z = 2
units/minute - Outcome:
False
(The snail will never reach the end.)
- Initial length of the rubber band:
Example 3:
- Initial length of the rubber band:
x = 100,000
units - Speed of the snail:
y = 0.1
units/minute - Increase rate of the rubber band:
z = 0.05
units/minute - Outcome:
False
(The snail will not be able to reach the end within one year.)
- Initial length of the rubber band:
Mathematics
Similar Kata:
Stats:
Created | Aug 27, 2024 |
Published | Aug 28, 2024 |
Warriors Trained | 2963 |
Total Skips | 50 |
Total Code Submissions | 5013 |
Total Times Completed | 1470 |
C++ Completions | 219 |
JavaScript Completions | 329 |
Python Completions | 582 |
Java Completions | 202 |
C Completions | 88 |
C# Completions | 132 |
Dart Completions | 21 |
Total Stars | 30 |
% of votes with a positive feedback rating | 82% of 143 |
Total "Very Satisfied" Votes | 103 |
Total "Somewhat Satisfied" Votes | 29 |
Total "Not Satisfied" Votes | 11 |
Total Rank Assessments | 18 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |