Advertisement
Deiancom

Training Lab

Jun 12th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class TrainingLab {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         double longSideOfTheHall = Double.parseDouble(scanner.nextLine());
  10.         double shortSideOfTheHall = Double.parseDouble(scanner.nextLine());
  11.  
  12.         int row = (int)Math.floor((shortSideOfTheHall - 1) * 100) /70;
  13.         int workingRow = (int)Math.floor(longSideOfTheHall * 100) /120;
  14.  
  15.         int countWorkingSpaces = (int)Math.floor(row * workingRow) - 3;
  16.  
  17.         System.out.println(countWorkingSpaces);
  18.        
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement