Python - 697 ×ばつ 1.19 ≈ 1644
Gee, I sure love lambdas.
Note: 3 and 5 were shamelessly copied from Volatility's answer, as I couldn't find a better alternative. Also, this was done just for fun.
f=lambda a,b:sum([x not in b for x in a]) # 1, 41 chars
f=lambda a,b:b+' '+a.replace('\n','\n'+b+' ') # 2, 43 chars
f=lambda s,n,b:s.replace(*['\t',' '*n][::b*2-1]) # 3, 47 chars
f=lambda s,n,m:'\n'.join([' '.join([s[x:x+m]for x in range(y*m,len(s),m*n)])for y in range(n)])
# 4, 94 chars
f=lambda s,n:max([s[x:x+n]for x in range(len(s)+1-n)],key=s.count)
# 5, 66 chars
import random;f=lambda s:' '.join([''.join(sorted(y,key=lambda*x:random.random()))for y in s.split()])
# 6, 102 chars
f=lambda s:s.replace(' ','').isdigit()and ''.join(map(chr,map(int,s.split())))or ' '.join(map(str,map(ord,s)))
# 7, 110 chars
import re;f=lambda s:re.sub('`(.*?)`','<code>\1円</code>',re.sub(r'\*(.*?)\*','<i>\1円</i>',re.sub(r'\*\*(.*?)\*\*','<b>\1円</b>',s)))
# 8, 128 chars
f=lambda s,n,r:''.join([len(x)>n and x[n]or r for x in s.split()])
# 9, 66 chars
EDIT: Thanks to Volatility for the tips.
Oberon
- 2.9k
- 1
- 16
- 16