Submit solution
Points:
50.00
Time limit:
1.0s
Memory limit:
256M
Input:
stdin
Output:
stdout
Author:
Suggester:
Problem type
Given a circle with radius πr and a square with side length a. We have the formula for the area of the circle and square as follows:
- Circle: ~S_c~ = π~r^2~
- Square: ~S_s~ = ~a^2~
In which: π = 3.14159265359
Your task is to compare the areas of the two shapes and give the result according to the following rule:
- If the area of the circle is larger than the area of the square → print "Circle"
- If the area of the circle is smaller than the area of the square → print "Square"
- If the areas are equal → print "Equal"
Input: Input from the standard device has the following format:
- The first line contains an integer t (1 ≤ t ≤ 10) - the number of data sets to be checked.
- The next t lines, each line contains two integers r and a:
- r is the radius of the circle (1 ≤ r ≤ ~10^{18}~)
- a is the side of the square (1 ≤ a ≤ ~10^{18}~)
Output: Write to the standard device, for each data set, print out a line containing the result on each line with the value "Circle", "Square" or "Equal" according to the problem requirements.
Exam:
Input
3
10 18
10 6
7 7
Output
Square
Circle
Circle
Explain
- Set 1: Circle is bigger than square → "Circle"
- Set 2: Circle is smaller than square → "Square"
- Set 3: Circle is still bigger than square → "Circle"
Comments