INTERCAL unary operators by 鳴神裁4.1号

function n(s,R){N=split("I 1 IV 4 V 5 IX 9 X 10 XL 40 L 50 XC 90 C 100 CD 400 D 500 CM 900 M 1e3",a)
for(;N;N-=2)for(;s>=a[N];s-=a[N])R=R a[N-1]
return R}{split("ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE",a)
for(x=i=_;i++<NF;x=x j)for(j=10;--j&&a[j]!=$i;)}NR%2{y=x
next}y>3{exit}{$0=(s=--y&&x%2?2^31-2e9:0)?"MM":_
for(i=0;x;x=int(x/2)){j=x%4
s+=(y?j&&j+y<5:j>2)*2^i++}if(s>=4e6){$0=$0n(int(s/1e6))
gsub(".","\\\\&")
s%=1e6}if(s>=4e3){$0=$0tolower(n(int(s/1e3)))
s%=1e3}$0=$0n(s)
$0||$0="NIHIL"}1

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page