Input is given from Standard Input in the following format:
R
Output
Print the circumference of the circle. Your output is considered correct if and only if its absolute or relative error from our answer is at most 10^{-2}.
Examples
Input
1
Output
6.28318530717958623200
Input
73
Output
458.67252742410977361942
Assistant
We need to read an integer R, compute circumference = 2 * pi * R. The problem statement says "Print the circumference of the circle." They gave examples with many decimal digits. But they only require absolute or relative error ≤ 1e-2. So we can output with enough precision. Usually, printing 2 * M_PI * R with default cout or printf is fine. But to be safe, output with something like printf("%.10f", 2M_PIR) or use high precision like M_PI from cmath.
We must ensure the output format: the examples show many decimals (20 decimal places). There's no explicit format requirement, so any output meeting error bound is fine.
But note: The problem is likely from AtCoder? Possibly "circumference of a circle" problem. It often expects something like 2piR. Use double and print with setprecision(15) or something.
Given constraints R up to 100, circumference up to about 628.3, error 1e-2 is fine.
Implementation: read integer, compute 2M_PIR, output. Ensure M_PI is defined. In C++, you can use acos(-1.0) if not.
Thus code:
#include
#include
#include
using namespace std;
int main() {
int R;
cin >> R;
double ans = 2 * M_PI * R;
cout << fixed << setprecision(10) << ans << endl;
return 0;
}
But the example shows 20 decimal places; maybe they want high precision? Not required. setprecision(10) yields 6.2831853072 (10 decimal places). That will be within error.
Better to set more: setprecision(15). However, need to ensure not scientific notation. "fixed" ensures decimal.
Given the typical solutions on AtCoder, many use printf("%.10f", 2piR). So okay.
Will produce correct output.
But the user said "Print the circumference of a circle". No more details. So answer is the code.
The problem statement: "Print the circumference of a circle of radius R." We'll produce a complete solution.