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

32544번 - Human Pyramid 다국어

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

문제

As chairman of the Building A Pyramid Committee, you are specialized in breaking one specific world record: building the highest human pyramid. Unfortunately, you only know a limited number of people who are willing to be in the pyramid. After all, building human pyramids does not make much money, so most people are volunteers.

A full human pyramid of height \(h\) consists of \(h\) layers of people. As seen from below, it has \(h\) people on the first layer, \(h-1\) on the second, \(h-2\) on the third, and so forth until eventually the final layer has just a single person. To determine whether you can break the world record, you need to know how high a pyramid you can build. Given how many people are available, how tall is the highest possible human pyramid that these people can make?

입력

The input consists of:

  • One line with an integer $n$ (1ドル \leq n \leq 10^{12}$), the number of people available to build the pyramid.

출력

Output the height of the highest possible pyramid you can build with $n$ people.

제한

예제 입력 1

3

예제 출력 1

2

예제 입력 2

12

예제 출력 2

4

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2024 Preliminaries H번

  • 문제를 만든 사람: Mees de Vries
(追記) (追記ここまで)

출처

대학교 대회

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

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