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), where 0.01 ≤ x ≤ 1,000,000.
  • y: Speed of the snail (in units per minute), where 0.01 ≤ y ≤ 1,000,000.
  • z: Amount by which the rubber band increases in length every minute (in units), where 0.01 ≤ z ≤ 1,000,000.

Examples:

  1. 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 in 10 minutes.)
  2. 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.)
  3. 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.)
Mathematics

Similar Kata:

Stats:

CreatedAug 27, 2024
PublishedAug 28, 2024
Warriors Trained2963
Total Skips50
Total Code Submissions5013
Total Times Completed1470
C++ Completions219
JavaScript Completions329
Python Completions582
Java Completions202
C Completions88
C# Completions132
Dart Completions21
Total Stars30
% of votes with a positive feedback rating82% of 143
Total "Very Satisfied" Votes103
Total "Somewhat Satisfied" Votes29
Total "Not Satisfied" Votes11
Total Rank Assessments18
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Wizardll Avatar
  • hobovsky Avatar
  • dfhwze Avatar
  • o2001 Avatar
  • Tester_blck Avatar
  • Skellybob56 Avatar
Ad