Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Elevator
- {
- class Program
- {
- static void Main(string[] args)
- {
- int numberOfPeople = int.Parse(Console.ReadLine());
- int capacity = int.Parse(Console.ReadLine());
- if (capacity >= numberOfPeople)
- {
- Console.WriteLine(1);
- }
- else if (capacity < numberOfPeople)
- {
- if (numberOfPeople % capacity != 0)
- {
- int courses = numberOfPeople / capacity + 1;
- Console.WriteLine(courses);
- }
- else
- {
- Console.WriteLine(numberOfPeople / capacity);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement