結果
| 問題 | No.604 誕生日のお小遣い | 
| コンテスト | |
| ユーザー |  Konton7 | 
| 提出日時 | 2019-05-08 12:00:02 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 583 bytes | 
| コンパイル時間 | 85 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-02 00:26:36 | 
| 合計ジャッジ時間 | 1,802 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 21 | 
ソースコード
a, b, c = [ int (v) for v in input().split() ] def getmoney(y): u = y // a v = y + (b-1) * u return v stop = 0 high = c low = 1 mid = (high + low) // 2 t = 0 anslist = [] while stop == 0: anslist.append(mid) print(getmoney(mid)) if getmoney(mid) == c: stop = 1 ans = mid elif getmoney(mid) > c: high = mid mid = (high + low) // 2 else: low = mid mid = (high + low) // 2 print(anslist) if len(anslist)> 4 and [anslist[-1],anslist[-2]] == [anslist[-3],anslist[-4]]: stop = 1 if getmoney(anslist[-1]) < c: print(anslist[-1]+1) else: print(anslist[-1])
