You are not logged in. Please login at www.codechef.com to post your questions!

×

AVHNTRI - Editorial

2
2

PROBLEM LINK:

Practice
Contest

Author: Amit Kumar Pandey
Editorialist: Arkapravo Ghosh

DIFFICULTY:

CAKEWALK

PREREQUISITES:

Math

PROBLEM:

The three angles of a triangle is given. It is required to find if the triangle is right-angled, obtuse or acute triangle.

EXPLANATION:

An acute triangle is a triangle with all three angles acute (less than 90°).
An obtuse triangle is one with one obtuse angle (greater than 90°) and two acute angles.
A right-angled triangle is a triangle with one right angle(equal to 90°) and two acute angles.
Since a triangle's angles must sum to 180°, no triangle can have more than one obtuse angle.
You just need to check the angles of the triangle and output the type of the triangle. If an angle of the triangle is equal to 90° then output "right", if an angle is greater than 90° then output "obtuse" else output "acute".
You can find the author's solution and my solution below. Hope this helps.:)

AUTHOR'S AND EDITORIALIST'S SOLUTIONS:

Author's solution can be found here.
Editorialist's solution can be found here.

RELATED PROBLEMS:

*AVNRTRI

This question is marked "community wiki".

asked 09 Jun '18, 21:08

horsbug98's gravatar image

4★horsbug98
3436
accept rate: 21%

wikified 09 Jun '18, 21:08

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×877
×81
×23
×7
×4

question asked: 09 Jun '18, 21:08

question was seen: 69 times

last updated: 09 Jun '18, 21:08