Xiang da OJ title address: Portal
Cycloid time limit: +Ms | Memory Limit:65536Kb
Description
A cycloid is the curve traced to a point in the rim of a circular wheel as the wheel rolls along a straight line. It is an example of a roulette, a curve generated by a curve rolling on another curve.
--from Wikipedia
Calculate the area of an arch of a cycloid generated by a circle of radius R.
Define PI as ACOs (-1.0).
Input
the first line of the input consists of a single integer K (1 <= k <=), denoting the number of test cases . Then K lines follow, each contains a real number R (0.0 < R < 1E3), indicating the radius of circle.
Output
for each test case, output a line containing one real number with exactly three digits after the decimal point, Indica Ting The area of an arch.
Sample Input
2
1.0
3.5
Sample Output
9.425
115.454
================================== 's Split Line =================================
The area of the arc that the circle passes through, this has a formula, the area that the cycloid leaves is equal to three times times the circle
#include <stdio.h> #include <iostream> #include <math.h>using namespace Std;int main () { int n; Double R; scanf ("%d", &n); while (n--) { cin>>r; Double X=3*acos ( -1.0) *r*r; printf ("%.3f\n", x); }}
acm--Mathematics--Xiang da oj 1088--cycloid