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

×

AVNRTRI - Editorial

1
2

PROBLEM LINK:

Contest
Practice

Author: Amit Kumar Pandey
Editorialist: Amit Kumar Pandey

DIFFICULTY:

SIMPLE

PREREQUISITES

Maths

PROBLEM:

Ironman wants to build his new core. For that, he inputs three random number x, y and z in Jarvis. Help Jarvis determine whether those three numbers are taken as sides form the isosceles triangle or not.

EXPLANATION:

A triangle is a 3-sided polygon.
We are given the length of three sides.
The condition for forming the triangle is the the sum of the two side of triangle must be greater than third side. If this condition satisfies then we have to find whether triangle is equilateral, isosceles or scalene triangle. 1. If all sides of the triangle are equal then it is equilateral.
2. If two sides are equals then the triangle is isosceles. If we find any isosceles triangle then we have to add one to counter variable because we have to print the total number of the isosceles triangle in the output.
3. else the triangle is scalene.

If the property of triangle doesn't get satisfied then we have to print "not triangle".



AUTHOR'S AND EDITORIALIST'S SOLUTIONS:

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

RELATED PROBLEMS:

AVHNTRI

asked 17 Jun '18, 06:11

apamit11's gravatar image

1★apamit11
775
accept rate: 16%

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:

×1,176
×864
×634
×2

question asked: 17 Jun '18, 06:11

question was seen: 73 times

last updated: 17 Jun '18, 06:11