Advertisement
DimitarTsvetkov

Elevator

Jan 30th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5. public static void main(String[] args) {
  6.  
  7.  
  8. Scanner scanner = new Scanner(System.in);
  9.  
  10. int people = Integer.parseInt(scanner.nextLine());
  11. int capacity = Integer.parseInt(scanner.nextLine());
  12.  
  13. int coursesFull = (int) Math.ceil((double) people / capacity);
  14.  
  15. System.out.println(coursesFull);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement