16225

Задача 1.1

Jan 9th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class YchebnaZala {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner sc = new Scanner(System.in);
  8.  
  9. double len = Double.parseDouble(sc.nextLine());
  10. double wid = Double.parseDouble(sc.nextLine());
  11.  
  12. len = len * 100;
  13. wid = wid * 100;
  14.  
  15. int cols = (int) (wid - 100) / 70;
  16. int rows = (int) (len / 120);
  17. int seats = (rows * cols) - 3;
  18.  
  19. System.out.println(seats);
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment