We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This code passes for test0 and fails fro all of others
I didn't understand the reason.
import math
un, b = map(int, input().split() )
def function(x,b):
return math.floor(2**(b-x**2))*10**(-9)
for _ in range(10**5):
un1 = un
un = function( un1, b)
print(un + un1)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #197: Investigating the behaviour of a recursively defined sequence
You are viewing a single comment's thread. Return to all comments →
This code passes for test0 and fails fro all of others I didn't understand the reason.