AtCoder Beginner Contest 180 Takahashi Unevolved D Problem

Asked 2 years ago, Updated 2 years ago, 62 views

D-Takahashi Unevolved Description Link
https://atcoder.jp/contests/abc180/editorial/219
With the answer code listed above,

ans+(y-1-x)//b

There is a part of , but I didn't understand the reason for doing -1 here.
Could you tell me what this means?

Thank you for your cooperation

python3 c++ algorithm

2022-09-30 14:34

1 Answers

If the strength is greater than or equal to Y, it will evolve, so you need to keep the strength below Y-1.


2022-09-30 14:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.