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

32557번 - Infinite Cash 다국어

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

문제

Svalur Handsome has finally graduated with a degree in computer science, and it couldn't have happened sooner. He has some rather unwise spending habits which he hopes will be more sustainable now that he can get a high paying job as a programmer. He has applied to a few places, and now has a contract in his hands that he could sign and start working almost immediately. But before he takes the offer he wants to figure out how long it could support his spending habits.

At the start of every day Svalur spends half of his remaining money, rounded up. The new job would pay $s$ ISK at the end of every $d$-th day, starting with the $d$-th day. He currently has $m$ ISK to spend as well.

입력

The input has three lines, each containing the positive integers $s, d, m$ respectively. They satisfy 1ドル \leq s, d, m \leq 2^{1000}$. As these payment details are for a computer science job the numbers are all given in binary, naturally.

출력

Print the number of the day that Svalur wants to spend money, but has none. This should naturally also be printed in binary. If he can support his spending habits indefinitely instead print Infinite money!.

제한

예제 입력 1

101110101
1010
10001110101010101

예제 출력 1

10011

예제 입력 2

101110101
1000
100011101

예제 출력 2

Infinite money!

예제 입력 3

101110101
1010
100011101

예제 출력 3

1001

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Nordic Collegiate Programming Contest > NCPC 2024 I번

  • 문제를 만든 사람: Arnar Bjarni Arnarson
(追記) (追記ここまで)

출처

대학교 대회

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

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