Home
Random
Nearby
Log in
Settings
Donate Now
If Wikipedia is useful to you, please give today.
About Wikipedia
Disclaimers
Search
TPK algorithm: Difference between revisions
Article
Talk
Language
Watch
View history
Edit
Browse history interactively
← Previous edit
Next edit →
Content deleted
Content added
Visual
Wikitext
Revision as of 02:04, 27 June 2007
edit
70.19.84.109
(
talk
)
→
Python version
← Previous edit
Revision as of 02:08, 27 June 2007
edit
undo
70.19.84.109
(
talk
)
→
Python version
Next edit →
Line 64:
<source lang="python">
from math import sqrt
a
for
=
i in
[int(raw_input()) for i in range(11)]
[::-1]:
▼
f = lambda t: sqrt(abs(t))+5*t**3
▼
▲
a = [int(raw_input()) for i in range(11)]
for i in a[::-1]:
print i,
▲
f
=
lambda
t:
y =
sqrt(abs(
t
i
))+5*
t
i
**3
print "TOO LARGE" if y > 400 else
f(i)
y
</source>