Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TeachingHall {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double h = Double.parseDouble(scanner.nextLine()) * 100d;
- double w = (Double.parseDouble(scanner.nextLine()) - 1) * 100d;
- int rows = (int) (h / 120d);
- int columns = (int) (w / 70d);
- int seats = rows * columns - 3;
- System.out.println(seats);
- }
- }
Add Comment
Please, Sign In to add comment