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

21881번 - Innome 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB65302543.103%

문제

Young software developer Michael succeeded on Innopolis Open and was awarded by Innobook laptop with a pre-installed "Innome" web browser. This strange web browser can support at most $k$ open windows and the $i$-th open tab in the window uses $i$ megabytes of memory. Michael knows that his new laptop has $m$ megabytes of memory. Please help Michael to calculate the maximum number of tabs he can open.

입력

The first line contains single integer $t,ドル the number of tests. The next $t$ lines contains description of the tests one per line. Each test is represented by two integers $m$ and $k,ドル the size of Innobook memory and the maximum possible number of windows.

출력

For each test output a single integer on a separate line, the maximum number of tabs that Michael can open.

제한

서브태스크

번호배점제한
110

$t \le 100,ドル $m \le 10^6,ドル $k = 1$

210

$t \le 100,ドル $m \le 10^6,ドル $k \le 2$

320

$t \le 1000,ドル $m \le 10^9,ドル $k \le 10^9$

425

$t \le 10^5,ドル $m \le 10^9,ドル $k \le 10^9$

535

$t \le 10^5,ドル $m \le 10^{18},ドル $k \le 10^9$

예제 입력 1

2
23 3
2 3

예제 출력 1

10
2

힌트

출처

Contest > Innopolis Open in Informatics > Innopolis Open, Second elimination round, 2018-2019 B번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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