ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > CEN109/111_2016_Questions > задача:


PE04. 51030 - Number of Right Triangles

CEN109/111_2016_Questions

Старт: 07.дек.2016 в 12:37:00
Финиш: 07.дек.2016 в 13:42:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• HW1. 51055 - The competition
• HW2. 51056 - Welcome Picnic
• PE01. 51027 - Download Percentage
• PE02. 51028 - Isosceles Triangles
• PE03. 51029 - Buy Three Items
• PE04. 51030 - Number of Right ...
• PE05. 51031 - Convert from Hex to...
• PE06. 51032 - Triangle Property
• PE07. 51033 - Sum of the series
• PE08. 51034 - Area of 3 Shapes
• PE09. 51040 - Annual profit
• PE10. 51041 - Plane Segmentation
• PE11. 51038 - Simple interest
• PE12. 51039 - Automated billing system

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Number of Right Triangles

Question: If a, b and c are the sides of a triangle, a right triangle complies the formula c2 = a2 + b2. You are given the sides of three triangles, How many of them are right triangles?

Input specification: You will be given 3 integers in three lines. (a, b and c) where 0 ≤ (a, b and c) ≤ 1 million.

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

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

Explanation: for the first sample:52 = 32 + 42 and 132 = 122 + 52 comply but the other number triple does not comply the pythagorean theorem. For the second sample, only one number triple (152 = 122 + 92) complies the pythagorean theorem.

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

www.contester.ru