TopCoder

Caido
主唱太拼命了

User's AC Ratio

73.2% (30/41)

Submission's AC Ratio

45.1% (32/71)

Tags

Description

給你一個圓的半徑,請問你可以計算出其面積嗎?

如果不記得的話,假設圓的半徑是 R,則其面積 A 可以表示為一個無限級數的根號:

A=k=16R4k2

Input Format

輸入只有一個正整數 R1R105),代表圓的半徑。

Output Format

請輸出一個浮點數,代表圓的面積。假設正確答案是 A,則你的答案 AA 的相對誤差必須少於 109 才會獲得 AC

兩個數字 ab 的相對誤差定義為 min(|ab|,|ab||b|)

Sample Input 1

1

Sample Output 1

3.141592654

Sample Input 2

2

Sample Output 2

12.56637061

Hints

Problem Source

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 0~13 無額外限制 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 524288 65536 1 2
1 1000 524288 65536 1 2
2 1000 524288 65536 2
3 1000 524288 65536 2
4 1000 524288 65536 2
5 1000 524288 65536 2
6 1000 524288 65536 2
7 1000 524288 65536 2
8 1000 524288 65536 2
9 1000 524288 65536 2
10 1000 524288 65536 2
11 1000 524288 65536 2
12 1000 524288 65536 2
13 1000 524288 65536 2