Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class TrainingLab {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double longSideOfTheHall = Double.parseDouble(scanner.nextLine());
- double shortSideOfTheHall = Double.parseDouble(scanner.nextLine());
- int row = (int)Math.floor((shortSideOfTheHall - 1) * 100) /70;
- int workingRow = (int)Math.floor(longSideOfTheHall * 100) /120;
- int countWorkingSpaces = (int)Math.floor(row * workingRow) - 3;
- System.out.println(countWorkingSpaces);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement