Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/halqa-yuzi

Area of a ring

Easy 1000 ms 64 MB 13%
Share

The radii $R$ and $r$ of two circles with a common centre are given, $R \gt r$. Find the area $S$ of the ring between them:

$$S = \pi * (R^{2} - r^{2})$$

Use $\pi = 3.141592653589793$.

Two circles with a common centre, radii R and r; the ring between them is shaded

Input

One line with two positive integers: $R$ and $r$.

Output

One number — $S$, with exactly 2 digits after the decimal point (for example, 9.42).

Note

$1 \le r \lt R \le 10^{4}$

Examples

Input #1
2 1
Output #1
9.42
Input #2
10 5
Output #2
235.62

Sign in to submit a solution

Signing up is free and takes a minute.