Byteland

#Siddhant Narang def foo(n): r = 0 if(n < 10): return n else: for i in range(2, 5): q = n / i p = foo(q) if(p > q): r = r + q + (p - q) else: r = r + q return r T = 10 result = [] for i in range(T): N = input() ans = foo(N) print ans if(ans > N): result.append(ans) else: result.append(N) for i in range(len(result)): print result[i]

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.