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

32902번 - Chips 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB72660356384.662%

문제

Programmer Vasiliy bought $k$ cans of chips, with $n$ chips in each can. Now he is watching a movie and eating chips. After each minute of the movie, our hero takes one of the cans and eats a chip from it.

At a certain moment, Vasiliy took one of the cans, but there were no chips left in it. What is the minimum and maximum number of minutes that could have passed since the start of the movie?

입력

The input consists of a single line containing two integers $k$ and $n$ separated by a space: the number of cans of chips and their size, respectively (1ドル \leq k, n \leq 50$).

출력

Output two integers separated by a space: the minimum and maximum number of minutes that could have passed before Vasiliy took a can without chips.

제한

예제 입력 1

3 4

예제 출력 1

5 13

예제 입력 2

49 15

예제 출력 2

16 736

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > ICPC 2024-2025 Northwestern Russia Qualification A번

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

출처

대학교 대회

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

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