CCC '14 J1 - Triangle Times

View as PDF

Submit solution

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

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


Output for Sample Input 1


Sample Input 2


Output for Sample Input 2



  • 8
    tappbros  commented on Sept. 30, 2019, 1:32 a.m. edited

    1.if you don't spell the words correctly you will get a wrong answer. 2.Don't prompt the judge or it will be wrong

    • 0
      Aetheryx_George  commented on Dec. 28, 2021, 12:40 a.m.

      Thanks so much for commenting that, that is the reason why my code failed for some of my text cases

    • -1
      10HCritical  commented on Feb. 16, 2021, 4:35 p.m. edited

      Ah i see

  • -59
    YounessTEA  commented on Aug. 26, 2017, 3:02 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.

    • 40
      DA_BIG_MO  commented on Dec. 16, 2018, 3:19 a.m.

      then your programs not correct

    • 22
      Kirito  commented on Aug. 26, 2017, 3:33 p.m.
      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.

  • -2
    Phoenix1369  commented on Sept. 19, 2014, 9:59 p.m.

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

    • 12
      root  commented on Feb. 2, 2017, 2:41 a.m. edited

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