Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package SamiqtIzpit2;
- import java.util.Scanner;
- public class Moon {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double speed = Double.parseDouble(scanner.nextLine());
- double needFuel = Double.parseDouble(scanner.nextLine());
- double distance = 384400 * 2;
- double time = distance / speed;
- double totalTime = time + 3;
- double fuel = needFuel * distance;
- System.out.printf("%.0f\n", Math.ceil(totalTime));
- System.out.printf("%.0f", fuel / 100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement