/** * Author: Jonathan Broome * Problem: UVA 11854 "Eygypt" */ import java.util.Scanner; public class Main11854 { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.nextLine(); while(!s.equals("0 0 0")) { String[] split = s.split("\\s"); if(split.length == 3) { int a = Integer.parseInt(split[0]); int b = Integer.parseInt(split[1]); int c = Integer.parseInt(split[2]); int aa = a*a; int bb = b*b; int cc = c*c; if(aa+bb==cc || bb+cc==aa || aa+cc==bb) System.out.println("right"); else System.out.println("wrong"); } s = in.nextLine(); } } }The statements and opinions included in these pages are those of only. Any statements and opinions included in these pages are not those of Louisiana State University or the LSU Board of Supervisors.
© 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Isaac Traxler