What's wrong with my code for problem 1853B — Fibonaccharsis

Правка en1, от _Spongey, 2023-12-25 22:46:32

So, My approach was to find the first two numbers they are fibbonachi like for example 6, 8, 14, 22 let's call the first number n, and the second n... then the sequence is: n, m, n+m, n+2m...

My code 238882947 So I basically found the sequence of ns and ms k'th index (K is the length of the sequence given) and made a for loop to get every possible number that works for this solution it worked right for most test cases (In test#1 lol) and printed out the correct first and second numbers of the sequence

Теги dp, solution, wrong answer, help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский _Spongey 2023-12-25 22:46:32 588 Initial revision (published)