|
|
вернуться в форумGDE OWIBKA ? (JAVA) import java.util.*; public class LuckyNumber{ public static void main(String args[]){ Scanner in = new Scanner(System.in); int x = in.nextInt(); int a1,a2,a3,b1,b2,b3; a1 = x/100000; a2 = (x/10000)%10; a3 = (x/1000)%10; b1 = (x/100)%10; b2 = (x/10)%10; b3 = x%10; if((a1+a2+a3) == (b1+b2+b3)) System.out.println("Lucky Number"); else if(a1+a2+a3-(b1+b2+b3)>1 ||(b1+b2+b3)-(a1+a2+a3)>1) { System.out.println("prostoi bilet"); } else System.out.println("Lucky Number budet sleduwii ili prediduwi bilet"); } } Re: GDE OWIBKA ? (JAVA) Послано Noob 9 ноя 2012 22:46 You should output "Yes" or "No" and nothing else Re: GDE OWIBKA ? (JAVA) WTF Re: GDE OWIBKA ? (JAVA) ЭTO RUSKIY BRAT |
|
|