0

Hofstadter a sequence code coach is not running

I am trying to run the code coach problem in python it is saying "Oops something went wrong" I have runned it 10-12 times https://www.sololearn.com/coach/92?ref=app Code I am writing https://sololearn.com/compiler-playground/cptSZA83743g/?ref=app

22nd Jun 2025, 6:17 AM
RISHABH
RISHABH - avatar
18 Answers
+ 1
I suggest you add a link to the code from the playground, so we could test it.
22nd Jun 2025, 8:18 AM
Jan
Jan - avatar
+ 1
Bob_Li done yes that is the problem , it is taking lots of computation power updated it check it out and finally it worked
22nd Jun 2025, 2:47 PM
RISHABH
RISHABH - avatar
+ 1
Jan yes, recursive solutions look pretty, but it turns into resource hog pretty fast. prefer iterative solutions to recursive ones if they exist.
23rd Jun 2025, 12:59 AM
Bob_Li
Bob_Li - avatar
+ 1
Upender Singh learn python and try easy code coaches
23rd Jun 2025, 10:00 AM
RISHABH
RISHABH - avatar
0
try to re-run the code again. your app might have failed to establish a link with the Sololearn server...
22nd Jun 2025, 7:25 AM
Bob_Li
Bob_Li - avatar
0
I have Runned it multiple times approximately 10 to 12 times still it is not running and showing the same message
22nd Jun 2025, 7:56 AM
RISHABH
RISHABH - avatar
0
don't write anything inside input x = int(input()) your algorithm doesn't work, but at least you can see the error message...
22nd Jun 2025, 12:21 PM
Bob_Li
Bob_Li - avatar
0
In code coach I did not write anything but it is still fails
22nd Jun 2025, 1:45 PM
RISHABH
RISHABH - avatar
0
Bob_Li I am just not able to insert screenshot else I just attach it
22nd Jun 2025, 1:47 PM
RISHABH
RISHABH - avatar
0
Bob_Li means q_Seq does not work ?
22nd Jun 2025, 1:54 PM
RISHABH
RISHABH - avatar
0
RISHABH in my phone, your algorithm slows down significantly after 33... Sololearn times out if I input 34. that's the challenge in the problem. find a faster or more efficient solution.
22nd Jun 2025, 2:23 PM
Bob_Li
Bob_Li - avatar
0
RISHABH 👍
22nd Jun 2025, 3:46 PM
Bob_Li
Bob_Li - avatar
0
It seems to be a smart move with that dictionary as an argument for that recursive function. At least it was enough to pass the test cases, but it's still limited in Python in general to only a maximum of 1000 as input, because of the recursive operations.
22nd Jun 2025, 6:07 PM
Jan
Jan - avatar
0
I am biggner how to start I can't understand anything
23rd Jun 2025, 7:14 AM
Upender Singh
Upender Singh - avatar
0
I don't even how to use codes 😞😞😓😓😓rishabh brother...
25th Jun 2025, 3:28 PM
Upender Singh
Upender Singh - avatar
0
Upender Singh have u done the python course from sololearn?
25th Jun 2025, 3:29 PM
RISHABH
RISHABH - avatar
0
I get stucked 🙏🙏🙏😔 It seems impossible to learn programming lan guages for me...plz help me
25th Jun 2025, 3:29 PM
Upender Singh
Upender Singh - avatar
0
Upender Singh stucked where ? If I can I will guide u
25th Jun 2025, 3:30 PM
RISHABH
RISHABH - avatar