Angles of Triangle

Problem Statement**

You are given 3 angles in degrees namely A, B and C. You need to find if these angles can form an equilateral triangle.

Input Format:

  • First line contains T, no of testcases
  • Each testcase contains A, B and C

Output Format:

  • Print YES if an equilateral triangle can be formed else NO

Constraints:

  • 1 <= T <= 10000
  • 10 <= A, B, C <= 360
Sample Input
Sample Output

Solution

file_type_python angles_of_triangle.py
for _ in range(int(input())):
    l = list(map(int, input().split()))
    print("YES" if sum(l) == 180 else "NO")

Comments

Load Comments