Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SchoolHall {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double hallLengthMeters = Double.parseDouble(scanner.nextLine());
- double hallWidthMeters = Double.parseDouble(scanner.nextLine());
- //int hlm = (int)hallLengthMeters;
- //int hwm = (int)hallWidthMeters;
- double hallAreaCm = (hallLengthMeters * 100) * (hallWidthMeters * 100);
- double corridorArea = 100 * (hallLengthMeters * 100);
- double freeAreaCm = hallAreaCm - corridorArea;
- int freeSpace = (int)freeAreaCm;
- int seat = 70 * 120;
- int seats = freeSpace/seat - 3;
- //int hallAreaCm = (hlm * 100) * (hwm * 100);
- //int workingPlaceCm = 70 * 120;
- //int corridorArea = 100 * (hlm * 100);
- //int columns = ((hlm * 100) - 100) / 70;
- //int rows = (hwm * 100) / 120;
- //int seats = columns * rows;
- //double freeArea = hallAreaCm - corridorArea;
- //double workingPlaces = freeArea/workingPlaceCm - 3;
- System.out.println(seats - 3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement