F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Triangle

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 514    Accepted Submission(s): 295


Problem Description
A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments.
Triangles can be classified according to the relative lengths of their sides:
¡¤ In an equilateral triangle all sides have the same length. An equilateral triangle is also a regular polygon with all angles measuring 60¡ã.
¡¤ In an isosceles triangle, two sides are equal in length. An isosceles triangle also has two angles of the same measure; namely, the angles opposite to the two sides of the same length; this fact is the content of the Isosceles triangle theorem.
¡¤ In a scalene triangle, all sides are unequal. The three angles are also all different in measure. Some (but not all) scalene triangles are also right triangles.
 

Input
The first line of input contains an integer (1 <= T <= 100), the number of test cases. T test data sets follow, each data set consists of 3 integers A, B and C, where (1 <= A,B,C <= 1,000,000) the triangle side lengths.
 

Output
For each test case, print ¡°equilateral¡±, ¡°isosceles¡± or ¡°scalene¡± describing the triangle type. If the input doesn¡¯t create a valid triangle output ¡°invalid!¡±. Follow the output format below.
 

Sample Input
2 3 3 4 6 4 2
 

Sample Output
Case #1: isosceles Case #2: invalid!
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 09:28:30, Gzip enabled