题目描述
Given the length of rectangle, width of rectangle, base of right angled triangle, perpendicular of right angled triangle and radius of circle respectively. Calculate the area of rectangle, right angled triangle and circle.
Example 1:
Input: L = 32 , W = 32 , B = 54
H = 12 , R = 52
Output: 1024 324 8490
Explanation:
Area of Rectangle = LW = 3232 = 1024
Area of Triangle = 0.5BH = 0.55412 = 324
Area of Circle = 3.14(52)^{2} = 8490
Example 2:
Input: L = 2 , W = 2 , B = 4
H = 8 , R = 4
Output: 4 16 50
Explanation:
Area of Rectangle = LW = 22 = 4
Area of Triangle = 0.5BH = 0.548 = 16
Area of Circle = 3.14(4)^{2} = 50
Your Task:
You don't need to read input or print anything. Your task is to complete the function getAreas() which takes 5 Integers L, W, B, H, R as input and returns the answer in a list of 3 integers.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
1 ≤ L,W,B,H,R ≤ 10^{4}
输入格式
见题面
输出格式
见题面