UVa 697

From Algorithmist
Revision as of 11:57, 11 January 2008 by LarryBot (Talk | contribs) (Changing sort index for category.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

697 - Jack and Jill[edit]

Summary[edit]

To calculate total time needed to complete a task.

Explanation[edit]

Simple math and physics calculation problem. But may become hard to get accepted. Follow the question carefully and make the formulae. Following formulae will be helpful

Volume of cylinder = pi\times radius^{2}\times height

Acceleration = distance/time^{2}

Note the units of the variables. Check the stopping condition for input as well as for the loop inside your program very carefully. Try to control the loop with an integer. Print a blank line between cases. Reserve 8 spaces before decimal point.

Input[edit]

20.0 36.0 72.0 2.0 10.0 18.0 10.0
25.0 72.0 200.0 1.5 8.0 30.0 20.0
0.0

Output[edit]

Scenario 1:
     up hill              20.00 sec
     well diameter        36.00 in
     water level          72.00 in
     bucket volume         2.00 cu ft
     bucket ascent rate   10.00 in/sec
     down hill            18.00 sec
     required volume      10.00 cu ft
     TIME REQUIRED       232.59 sec

Scenario 2:
     up hill              25.00 sec
     well diameter        72.00 in
     water level         200.00 in
     bucket volume         1.50 cu ft
     bucket ascent rate    8.00 in/sec
     down hill            30.00 sec
     required volume      20.00 cu ft
     TIME REQUIRED      1141.63 sec