Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int videosPrice = Integer.parseInt(scanner.nextLine()),
- cablesPrice = Integer.parseInt(scanner.nextLine()),
- computerPrice = (videosPrice + cablesPrice) * 13 + 1000;
- double powerPerDay = Double.parseDouble(scanner.nextLine()),
- profitPerDay = Double.parseDouble(scanner.nextLine()),
- cashbackDays = Math.ceil(computerPrice / ((profitPerDay - powerPerDay) * 13));
- System.out.printf("%d\n%d\n", computerPrice, (int) cashbackDays);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement