Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ZadachiOtIzpita2;
- import java.util.Scanner;
- public class MiningRig {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int priceVIdeo = Integer.parseInt(scanner.nextLine());
- int priceprovodnik = Integer.parseInt(scanner.nextLine());
- double pricePerDay = Double.parseDouble(scanner.nextLine());
- double profitPerDay = Double.parseDouble(scanner.nextLine());
- double totalSpent = (priceVIdeo + priceprovodnik) * 13 + 1000;
- double totalNetIncPerGpu = (profitPerDay - pricePerDay) * 13;
- System.out.printf("%.0f\n", totalSpent);
- System.out.printf("%.0f", Math.ceil(totalSpent / totalNetIncPerGpu));
- }
- }
Add Comment
Please, Sign In to add comment