Advertisement
Ivakis

Training Lab

Sep 21st, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class demo {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. double h = Double.parseDouble(scanner.nextLine());
  8. double w = Double.parseDouble(scanner.nextLine());
  9.  
  10. int rolls = (int)(h * 100 / 120);
  11. int desks = (int)((w * 100 - 100) / 70);
  12.  
  13. int result = rolls * desks - 3;
  14.  
  15. System.out.println(result);
  16.  
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement