CCC '14 J1 - Triangle Times

View as PDF

Submit solution


Points:3
Time limit:2.0s
Memory limit:64M

Problem type

Canadian Computing Competition: 2014 Stage 1, Junior #1

You have trouble remembering which type of triangle is which. You write a program to help. Your program reads in three angles (in degrees).

  • If all three angles are 60, output Equilateral.
  • If the three angles add up to 180 and exactly two of the angles are the same, output Isosceles.
  • If the three angles add up to 180 and no two angles are the same, output Scalene.
  • If the three angles do not add up to 180, output Error.

Input Specification

The input consists of three integers, each on a separate line. Each integer will be greater than 0 and less than 180.

Output Specification

Exactly one of Equilateral, Isosceles, Scalene or Error will be printed on one line.

Sample Input 1

60
70
50

Output for Sample Input 1

Scalene

Sample Input 2

60
75
55

Output for Sample Input 2

Error

Comments


  • -2
    YounessTEA
     commented on Aug. 26, 2017

    My program is correct but i always got WA in test 1 and the last one


    • 1
      Kirito
       commented on Aug. 26, 2017
      1. If your program fails test cases that over 700 users have solved, then odds are your program is not correct.

      2. The sum of the the angles of a triangle is exactly 180 degrees.


      • 0
        Username
         commented on Sept. 6, 2017

        Savage


      • 0
        YounessTEA
         commented on Aug. 29, 2017

        Sorry i wrote the programm in hurry so i didn't notice! Thank you


  • 0
    Roronoa_Zoro1540
     commented on July 17, 2017

    shit I got it wrong cuz instead of "Isosceles" I printed out "Iscosceles"


    • 1
      pro
       commented on Aug. 10, 2017

      I also spelled the word "Isosceles" wrong lmao


  • -12
    leonidastherebellious
     commented on Oct. 6, 2015 edited
    Unsung Heroism

    v I thought of that and told patrick.


  • -5
    Phoenix1369
     commented on Sept. 19, 2014
    0 Degree Angle

    Some of the older solutions would not output "Error" if given angles with degree 90 90 and 0.


    • 2
      root
       commented on Feb. 1, 2017 edited

      Each integer will be greater than 0 and less than 180.