Untitled

mail@pastecode.io avatar
unknown
java
3 years ago
583 B
2
Indexable
Never
import java.util.Scanner;

public class Santa {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        double avgSpeed = Double.parseDouble(scan.nextLine());
        double fuelNeed = Double.parseDouble(scan.nextLine());

        double totalDist = 384400 * 2;

        double toAndBack = Math.ceil(totalDist / avgSpeed);

        double totalTime = toAndBack + 3;

        double fuel = (fuelNeed * totalDist) / 100;

        System.out.printf("%.0f%n", totalTime);
        System.out.printf("%.0f", fuel);
    }
}