football league standings by nn

for(a=[];g=readline(i=G=W=D=F=A=0);P=3*W+D,a[6*P+F]=[N,G,P,W,D,G-W-D,F,A,F-A])for([j,v]in b=g.split(B=' '))j?(w=v[0],l=v[2],G++,W+=w>l,D+=w==l,F-=-w,A-=-l):N=v
print(S='    ',N[3]?B+B:N[2]?B:'','P Pt  W  D  L  F  A  GD')
for(k=90;k--;)if(v=a[k]){for(s=v[j=0];j++<7;s+=r(S+v[j]))r=/...$/
u=v[j]
print(++i,s,r(S+(u>0?'+'+u:u)))}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page