ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1493. One Step from Happiness

GDE OWIBKA ? (JAVA)
Posted by shaihin 9 Nov 2012 18:42
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)
Posted by Noob 9 Nov 2012 22:46
You should output "Yes" or "No" and nothing else
Re: GDE OWIBKA ? (JAVA)
Posted by Evgeniy[VVV] 20 Aug 2014 20:15
WTF
Re: GDE OWIBKA ? (JAVA)
Posted by SMMaster 13 Jan 2020 16:53
ЭTO RUSKIY BRAT