Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Moon {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int Speed = Integer.parseInt(scanner.nextLine());
- int Fuel = Integer.parseInt(scanner.nextLine());
- double Distance = 768800;
- double Time = Distance / Speed;
- double TotalTime = Math.ceil(Time + 3);
- System.out.printf("%.0f%n", TotalTime);
- double TotalFuel = (Fuel * Distance) / 100;
- System.out.printf("%.0f", TotalFuel);
- }
- }
Add Comment
Please, Sign In to add comment