OA Problems
Разница между en1 и en2, 0 символ(ов) изменены
Online Assessment Problem ??↵
==================↵

You are given three integers: **A**, **B**, and **N**. Your task is to determine whether it is possible to reach the value↵
 **N** starting from either **A** or **B** using the one of the following operations.↵

- Replace A with A + B.↵
- Replace B with A + B.↵

If it is possible to reach **N**, print the minimum number of operations required. If it is not possible print NOT POSSIBLE.↵

`Constraints :- [-10000000000 <= A, B, N <= 10000000000].`↵

`Example 1:`↵
`Input : 1, 2, 5`↵
`Output : 2`↵
`Explanation : (1, 2) -> (2, 3) -> (3, 5)`↵

`Example 2:`↵
`Input : -1, 0, 5`↵
`Output : NOT POSSIBLE`↵
`Explanation : (-1, 0) -> (-1, 0) State are either remain unchanged or produce Negative value for both A and B.`↵

https://leetcode.com/discuss/interview-question/5490523/Hyper-verge-Online-Assessment-Problem

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Last_Of_UsOO 2024-07-27 20:50:06 0 (published)
en1 Английский Last_Of_UsOO 2024-07-27 20:49:42 879 Initial revision (saved to drafts)