17. Cricket Ground Fencing

Acceptance — 0 accepted 0 submissions

Easy
BasicsMath
No companies listed
The village panchayat wants to prepare a rectangular cricket ground. They need two things:
1. The area, to know how much grass to plant.
2. The perimeter, to know how much fencing wire to buy.

Given the length L and breadth B in metres, print both.

Input Format
A single line with two integers L and B.

Output Format
Print the area on the first line and the perimeter on the second line.

Constraints
• 1 ≤ L, B ≤ 10000

Example 1

Input
10 5
Output
50
30

Explanation Area = 10 × 5 = 50. Perimeter = 2 × (10 + 5) = 30.

Example 2

Input
7 7
Output
49
28

Explanation A square ground: area 49, perimeter 28.

Example 3

Input
100 60
Output
6000
320

Explanation Area = 6000, perimeter = 320.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
50 30
No results yet
Run your code to test it against the sample cases.
Problem List