TRIANGLE7 - Editorial

PROBLEM LINK:

Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4

Author: raysh07
Tester: sushil2006
Editorialist: iceknight1093

DIFFICULTY:

Cakewalk

PREREQUISITES:

None

PROBLEM:

You’re given two sides of a triangle, A and B. Find the third side.

EXPLANATION:

Let the third side of the triangle be C.
We know that A+B+C = 180 must hold.
This gives us

C = 180 - A - B

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (PyPy3)
a, b = map(int, input().split())
print(180 - a - b)