51. Space Well

Time Limit: 1 seconds

Memory Limit: 128 MB

Rating: 1000

Problem Statement

Write a program that asks the user for the radius of the well opening (in $m$) and the thickness of the covering that they want (in $cm$) Use $\pi$ as $3.14$ It costs RM2.50 for every $1$ metre area of the opening, and an additional 50 cents is added if the thickness of the covering exceeds $5$cm. Output the area of the opening and the price of the covering following the output format.

Input

The input is an integer. circle area = Integer radius = Integer thickness = Integer price = Float, to one decimal place

Output

The area of the opening is $area$ The price is RM $price$

Sample Cases
Sample Input 0:
3
8

Sample Output 0:
The area of the opening is 28
The price is RM 70.5
Explanation

Not available for this problem.

Sources

KL Coding Cup October 2024 > Problem 3

Submit | Back