루미 알고리즘

#1629브론즈The Triangle Factory

PO 2025 학교 예선코딩출제 Joshua Andersson, Harry Zhang영어 원문이 문제가 어렵다면 — 배우는 순서 보기

영어 원문입니다. 원문의 수식·표를 글자로 옮겨 모양이 다를 수 있습니다. 정확한 내용은 원문 페이지에서 확인하세요. 원문 페이지 열기 (새 창)

Problem

Tristian works at a triangle factory. His job is to classify different types of triangles produced in the factory. Tristian now asks you to write a program that can replace him.

Tristian will give you three positive integers, a, b, and c. These are the three angles of a triangle, given in degrees.

Your program should do the following:

  • If the triangle is obtuse, the program should print “Trubbig Triangel”.
  • If the triangle is acute, the program should print “Spetsig Triangel”.
  • If the triangle is right-angled, the program should print “Ratvinklig Triangel”.

To remind you of the definitions of obtuse, acute, and right-angled triangles:

  • A triangle is obtuse if any of its angles are greater than 90 degrees.
  • A triangle is acute if all its angles are less than 90 degrees.
  • A triangle is right-angled if one of its angles is exactly 90 degrees.

Input

The first line of input contains the integer a (1 ≤ a < 180), the first angle of the triangle. The second line of input contains the integer b (1 ≤ b < 180), the second angle of the triangle. The third line of input contains the integer c (1 ≤ c < 180), the third angle of the triangle.

It is guaranteed that (1 ≤ a, b, c < 180) holds. It is also guaranteed that the input forms a valid triangle, meaning a + b + c = 180.

Output

The program should then print whether the triangle formed by the angles a, b, and c is acute, obtuse, or right-angled. The answer must be one of the following: “Trubbig Triangel”, “Spetsig Triangel”, or “Ratvinklig Triangel”.

Scoring

Your solution will be tested on a set of test groups, each worth a number of points. Each test group contains a set of test cases. To get the points for a test group you need to solve all test cases in the test group.

GroupPointsConstraints
1100No additional constraints.

예제

예제 1

입력
100
40
40
출력
Trubbig Triangel

예제 2

입력
60
40
80
출력
Spetsig Triangel

예제 3

입력
30
60
90
출력
Ratvinklig Triangel

출처 표기

출처: Programmeringsolympiaden 2025년 학교 예선 · 원문 페이지 · 이용 조건 CC BY-SA · LaTeX 원문을 화면용 글로 옮겼습니다(수식·표의 모양이 다를 수 있습니다). 내용은 고치지 않았습니다.

크리에이티브 커먼즈 저작자표시-동일조건변경허락.

문제 출처: 한국정보올림피아드(KOI) (CC BY-NC-SA 4.0) · International Olympiad in Informatics (IOI) (CC BY) · Centre for Education in Mathematics and Computing (CEMC), University of Waterloo (CC BY-NC 4.0) · Programmeringsolympiaden (CC BY-SA) · CSES Problem Set (Antti Laaksonen) (CC BY-NC-SA 4.0). 루미 알고리즘은 위 단체들과 관계없는 별도의 서비스이며, 자료는 원문 그대로 싣습니다. 문제마다 출처와 이용 조건을 따로 표기합니다.