YavorGrancharov

TrainingLab

Dec 20th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class TrainingLab {
  3.     public static void main(String[] args) {
  4.         Scanner console = new Scanner(System.in);
  5.         double h = Double.parseDouble(console.nextLine());
  6.         double w = Double.parseDouble(console.nextLine());
  7.         double row = Math.floor((h * 100) / 120);
  8.         double desk = Math.floor(((w * 100) - 100) / 70);
  9.         double seats = (row * desk - 3);
  10.         if (3 <= h || h <= w || w <= 100) {
  11.             System.out.printf("%.0f", seats);
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment