GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Sunday, 15 May 2022

[Solution] Bucket and Water Flow CodeChef Solution | CodeChef Problem Solution 2022

Alice has a bucket of water initially having W litres of water in it. The maximum capacity of the bucket is X liters.

Alice turned on the tap and the water starts flowing into the bucket at a rate of Y litres/hour. She left the tap running for exactly Z hours. Determine whether the bucket has been overflow, 

Solution Click:-  CLICK HERE

filled exactly, or is still left unfilled.

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases. The
Solution Click:-  CLICK HERE
  •  description of the test cases follows.

  • Each test case consists of a single line of input containing four space-separated integers W, X, Y, Z.

Output Format

For each test case, print the answer on a new line:

  • If the bucket has overflown print overflow
  • If it is exactly filled print filled
  • If it is still unfilled, print unfilled

You may print each character of the string in uppercase or lowercase (for example, the strings filled, FIlled, fiLLed, and FILLED will all be treated as identical).

Constraints

  • 1≤T≤1000
  • 1≤W,X,Y,Z≤1000

Subtasks

  • Subtask 1 (100 points):
    • Original constraints.

Join Now for Solution:- 

No comments:

Post a Comment