-
Notifications
You must be signed in to change notification settings - Fork 55
/
Java.java
43 lines (37 loc) · 1.08 KB
/
Java.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/****************************************/
/* */
/* CodinGame.com Solutions by pathosDev */
/* */
/* Puzzle: Mars Lander - Episode 1 */
/* Difficulty: Easy */
/* Date solved: 08.11.2018 */
/* */
/****************************************/
import java.util.Scanner;
class Player
{
public static void main(String[] args)
{
//Read inputs.
Scanner scanner = new Scanner(System.in);
int surfaceN = Integer.parseInt(scanner.nextLine());
for (int i = 0; i < surfaceN; i++)
{
scanner.nextLine();
}
//Game loop.
while (true)
{
int vSpeed = Integer.parseInt(scanner.nextLine().split(" ")[3]);
//Keep vertical speed at -40 m/s.
if (vSpeed <= -40)
{
System.out.println("0 4");
}
else
{
System.out.println("0 0");
}
}
}
}