HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


51032 - Triangle Property

Guest
• Review clarifications (1)

Section problems

• Cirku Belluci
• 50659 - Covariance Matrix
• El Clasico
• 50657 - Permutations and Combinat...
• 50658 - The Message
• 50916 - Ascending Numbers
• 50917 - Descending Numbers
• 51029 - Buy Three Items
• 51032 - Triangle Property
• 51033 - Sum of the series
• 51027 - Download Percentage
• 51028 - Isosceles Triangles
• 51031 - Convert from Hex to Dec
• 51030 - Number of Right Triangles
• 50553 - Divisible by m
• 50554 - nth power of m
• 50557 - nth Power of m (Long Multiply)

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Triangle Property

Question: In mathematics, the triangle inequality states that for any triangle, sum of the lengths of any two sides must be greater than the length of the remaining side. You are given the sides of three triangles, how many of them comply the triangle property?

Input specification: You will be given 3 integers in three lines. (s1, s2 and s3) where 0 ≤ (s1, s2 and s3) ≤ 1 million.

Output specification: Show one number, the number of triangles.

Sample Input I
3 4 5
12 5 13
5 10 15
Sample Input II
19 9 8
6 11 14
3 17 12
Sample Output I
2
Sample Output II
1

Explanation: for the first sample: the third number triple does not comply the triangle property 15 < 5+10. The other two number triples are OK.
For the second sample, only the the second input complies the triangle property 14, 6, 11.

Для отправки решений необходимо выполнить вход.

www.contester.ru