Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
The challenge involves mathematics in some central way. Also consider using more specific tags, listed in the tag wiki info.
4
votes
Reverse Engineer Polling Statistics
Python, 154
def r(l):
v=0
while 1:
v+=1;o=[round(y*v/100)for y in l];s=sum(o)
if s:
if all(a==b for a,b in zip(l,[round(y*1000/s)/10for y in o])):return s
3
votes
Implement hyperexponentiation/tetration without the use of '^'
Python, 161 - 5 (no * operator) = 156
r=xrange
def m(x,y):
i=0
for n in r(y):i+=x
return i
def e(x,y):
i=1
for n in r(1,y+1):i=m(i,x)
return i
def t(x,y):
i=1
for n in r(y):i=e(x,i)
return i …