Logo
(追記) (追記ここまで)

26589번 - Demo Clean Up 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB71362172.414%

문제

A demolitions company has hired you to write a program. After every project they have to move away all the debris and they want to know how many truck loads that it will take. Write a program that given the amount of weight the company truck can hold and how much every piece of debris weighs, it will find the minimum number of truck loads to clear the site of debris.

입력

There will be an unknown number of inputs, each on its own line. Each input will start with how much the truck can transport in a single load, followed by the weight of each piece of debris at the site. Each value will be separated by a single space.

출력

Display the minimum number of loads needed to clear the site for each input. Each result should be on its own line.

제한

예제 입력 1

100 75 75 50
50 25 26 12 12 18
17 2 12 15 16 8 8 8

예제 출력 1

3
2
5

힌트

출처

School > PLU High School Programming Contest > PLU 2020 > Advanced 7번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /