Advertisement
deyanmalinov

03. Elevator

Feb 13th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.*;
  4.  
  5. public class Main {
  6.         public static void main(String[] args) {
  7.             Scanner scan = new Scanner(System.in);
  8.             int numPeople = Integer.parseInt(scan.nextLine());
  9.             int capasiti = Integer.parseInt(scan.nextLine());
  10.  
  11.             int cours = numPeople / capasiti;
  12.             int cous = numPeople % capasiti;
  13.             if (cous!=0){
  14.                 cours++;
  15.             }
  16.             System.out.println(cours);
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement