Witam
Rozwiązuje zadanie JWSPLIN i dostaję błąd NZEC. Sprawdziłem kod na Ideone.com i przechodzi bez problemu. Ktoś potrafiłby mi pomóc? Serdecznie dziękuje
Ideone: http://ideone.com/xHKlnj7
class JWSPLIN {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
String input[];
int x,y,x1,y1,x2,y2,score;
while(t-->0){
score = 0;
input = br.readLine().trim().split(" ");
x = Integer.parseInt(input[0]);
y = Integer.parseInt(input[1]);
x1 = Integer.parseInt(input[2]);
y1 = Integer.parseInt(input[3]);
x2 = Integer.parseInt(input[4]);
y2 = Integer.parseInt(input[5]);
score = x * y1 + x1 * y2 + y * x2 - y1 * x2 - x * y2 - y * x1;
if(score==0){
System.out.println("TAK");
}else{
System.out.println("NIE");
}
}
}
}
created
last reply
- 20
replies
- 1.6k
views
- 8
users
- 6
links