python | Unsorted

Telegram-канал python - Python

135201

You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython

Subscribe to a channel

Python

ah i see thanksss bro😁

Читать полностью…

Python

Do you use linux or windows

Читать полностью…

Python

But that formula got the right answer for n = 1 - 4😭

Читать полностью…

Python

then I have no idea 😂

Читать полностью…

Python

Can you find the syntax to increase allowed execution time and apply it

Читать полностью…

Python

this is known as tabulation btw. (alternative to memorization with recursion)

Читать полностью…

Python

can you give some samples for me to validate the output I generated.

Читать полностью…

Python

if n so small i can find the answer

Читать полностью…

Python

output = 'Execution Timed Out (12000ms)'

Читать полностью…

Python

still the same get 'Execution Timed Out (12000ms)'

Читать полностью…

Python

how about you use for loop to replace recursion instead

Читать полностью…

Python

yes, u right. im sorry for misinterpreted. but what i get is this one 'Execution Timed Out (12000 ms)'

Читать полностью…

Python

Oh i see. sorry, maybe I misinterpreted. What I mean by wrong output is that it does not provide a correct and appropriate solution to what the case provider requested😁

Читать полностью…

Python

but with all due respect, I appreciate what I just learned from your response

Читать полностью…

Python

the code that i gave its right but i need to make that code is effective. I mean like its more faster ya with memo or using loop its get the right answer and there's nothing wrong with that. But i want to ask in this group especially ask to u can u gave me more effective than memo or using loops? That's my point bro

Читать полностью…

Python

timeout /t 3600 your_script.py

In terminal

Читать полностью…

Python

how? idk how to apply increase of execution time

Читать полностью…

Python

i try with mathematics way with this formula 3(n² - 1) + 3n

Читать полностью…

Python

so sorry the output still same😔

Читать полностью…

Python

ok i will try this code thanks

Читать полностью…

Python

def find_x(n):
if n == 0: return 0

table = [0] * (n + 1)

for i in range(1, n + 1):
table[i] = table[i - 1] + 3 * i
for j in range(1, i):
table[i] += table[j - 1] + 3 * j

return table[n]

Читать полностью…

Python

but if n > 10³ idk why can't find the answer

Читать полностью…

Python

do you know the answer?

Читать полностью…

Python

can you give some input and output for testing?

Читать полностью…

Python

yup. are you mange to do it?

Читать полностью…

Python

if i use memoization too i get that output

Читать полностью…

Python

Sounds like does not produce the correct output, which means the code is wrong.

Читать полностью…

Python

You need to be careful with what you say. When the code produces the correct output but isn't fast enough, it isn't wrong. It just not satisfies the requirements. If it produces the wrong output, it's wrong.

Читать полностью…

Python

There's nothing wrong with asking whether it's possible here to know how to get the mathematical formula wisely or what? who knows?

Читать полностью…

Python

I give you another example:

Here is wrong code. I need a formula from it to make it faster. Oh, and it's wrong code. It produces the wrong result. How could you possibly answer that?

Читать полностью…
Subscribe to a channel