#K64977. Surface Area Calculation for Consecutive Spheres
Surface Area Calculation for Consecutive Spheres
Surface Area Calculation for Consecutive Spheres
Given an integer radius \(R\), compute the surface area of a sphere for each radius from \(R\) to \(R+99\). The surface area \(A\) of a sphere with radius \(r\) is given by the formula:
\(A=4\pi r^2\)
Use double‐precision arithmetic to ensure accuracy. Print the surface areas in order, each on a new line.
inputFormat
The input consists of a single line containing one integer (R) (via stdin), which represents the starting radius.
outputFormat
Output 100 lines to stdout. Each line should contain a floating point number representing the surface area of a sphere with radius (r), where (r) starts at (R) and increases by 1 for each line, up to (R+99).## sample
1
12.566370614359172
50.26548245743669
113.09733552923255
... (Total 100 lines, with the last line being 125663.70614359172)
</p>