desislava_topuzakova

03. Elevator

Jan 23rd, 2021
890
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Elevator_03 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner (System.in);
  6.         int people = Integer.parseInt(scanner.nextLine());
  7.         int capacity = Integer.parseInt(scanner.nextLine());
  8.  
  9.         //курс = people / capacity; (нагоре)
  10.         double courses = people * 1.0 / capacity;
  11.  
  12.         System.out.printf("%.0f", Math.ceil(courses));
  13.  
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment