跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F0556. Problem A: Egypt

  • ID: 562
  • 传统题
  • 1000ms
  • 128MiB
  • 尝试: 1
  • AC · 已通过: 1
  • 教学难度:待分级
  • 上传者:
  • 待分类
  • 整理状态
  • 难度待定
  • 难度
  • 共享题库
  • 高校与竞赛共享题
  • 英文题面
  • 题目来源
  • 题面语言

Problem A: Egypt

题目描述

Problem A: Egypt

A long time ago, the Egyptians figured out that a triangle with sides of length 3, 4, and 5 had a right angle as its largest angle. You must determine if other triangles have a similar property.

The Input

Input represents several test cases, followed by a line containing 0 0 0. Each test case has three positive integers, less than 30,000, denoting the lengths of the sides of a triangle.

The Output

For each test case, a line containing "right" if the triangle is a right triangle, and a line containing "wrong" if the triangle is not a right triangle.

样例 1

输入

6 8 10
25 52 60
5 12 13
0 0 0

输出

right
wrong
right

题目来源:Waterloo October 2, 2010;FPS 共享题包,题包内第 1 题。保留原作者与原赛事署名。