結果
| 問題 | No.604 誕生日のお小遣い |
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2019-05-08 12:00:02 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 975 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-03-23 04:11:29 |
| 合計ジャッジ時間 | 3,650 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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])
Konton7