시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 2813 746 603 27.930%

문제

강민이는 치킨 한 마리를 주문할 수 있는 치킨 쿠폰을 n장 가지고 있다. 이 치킨집에서는 치킨을 한 마리 주문할 때마다 도장을 하나씩 찍어 주는데, 도장을 k개 모으면 치킨 쿠폰 한 장으로 교환할 수 있다.

강민이가 지금 갖고 있는 치킨 쿠폰으로 치킨을 최대 몇 마리나 먹을 수 있는지 구하여라. 단, 치킨을 주문하기 위해서는 반드시 치킨 쿠폰을 갖고 있어야 한다.

입력

여러 줄에 걸쳐서 정수 n과 k가 주어진다. k는 1보다 크다.

출력

각 입력마다 한 줄에 정답을 출력한다.

예제 입력 1

4 3
10 3
100 5

예제 출력 1

5
14
124

힌트

 

 

W3sicHJvYmxlbV9pZCI6IjE2NzMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNlNThcdWQwYTggXHVjZmUwXHVkM2YwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWFjMTVcdWJiZmNcdWM3NzRcdWIyOTQgXHVjZTU4XHVkMGE4IFx1ZDU1YyBcdWI5YzhcdWI5YWNcdWI5N2MgXHVjOGZjXHViYjM4XHVkNTYwIFx1YzIxOCBcdWM3ODhcdWIyOTQgXHVjZTU4XHVkMGE4IFx1Y2ZlMFx1ZDNmMFx1Yzc0NCBuXHVjN2E1IFx1YWMwMFx1YzljMFx1YWNlMCBcdWM3ODhcdWIyZTQuIFx1Yzc3NCBcdWNlNThcdWQwYThcdWM5ZDFcdWM1ZDBcdWMxMWNcdWIyOTQgXHVjZTU4XHVkMGE4XHVjNzQ0IFx1ZDU1YyBcdWI5YzhcdWI5YWMgXHVjOGZjXHViYjM4XHVkNTYwIFx1YjU0Y1x1YjljOFx1YjJlNCBcdWIzYzRcdWM3YTVcdWM3NDQgXHVkNTU4XHViMDk4XHVjNTI5IFx1Y2MwZFx1YzViNCBcdWM4ZmNcdWIyOTRcdWIzNzAsIFx1YjNjNFx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vYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

ACM-ICPC > Regionals > North America > Rocky Mountain Regional > Alberta Collegiate Programming Contest > ACPC 2000 D번

  • 잘못된 번역을 찾은 사람: doju
  • 문제를 번역한 사람: joonas