Not an official ACM page
[Problem G | 1994 Western European Regional problem set | My ACM problem archive | my home page]

1994-1995 ACM International Collegiate Programming Contest
Western European Regional
Practice Session

Problem F

Soccer

Last summer, the United States have been fascinated by soccer. Not that they actually enjoyed the sport, but they were amazed that there were people prepared to fly in all the way from Europe, pay a huge amount of money, and then just sit around for ninety minutes watching 22 guys running after a ball. Even with a strike going on, base ball seems more enjoyable.

Anyway, John found himself watching one of the games on television and, being used to American Football where the ball has a funny shape, wondered if calculating the surface area of the ball could be done using the mathematics he had learned at high school. Maybe you can assist him, assuming that the balls used for soccer are perfect spheres and the surface of a sphere is 4 × p × r ² (I do not need to tell you that p is 3.1415926535...).

Input Specification

The first line of input is an integer N specifying the number of test cases. The next N lines each contain the radius R of a ball (in centimeters), where R is a non-negative integer less than 100.

Output Specification

For each test case, print the text: 'A ball with radius R has a surface area of S square meters.', where R is the radius in meters, with a fractional part of exactly two digits, and S is the surface area of the ball, rounded to a fractional part of exactly four digits.

Example Input

3 
1
10
100

Example Output

A ball with radius 0.01 has a surface area of 0.0013 square meters.
A ball with radius 0.10 has a surface area of 0.1257 square meters.
A ball with radius 1.00 has a surface area of 12.5664 square meters.

This page maintained by Ed Karrels.
Last updated November 11, 1997