main(a,r){for(regcomp(r,"^M*(C[MD]|D?C{,3})(X.|L?X{,3})(I[XV]|V?I{,3})$",1);gets(&a);puts(&a))a=49^regexec(r,&a,0,0.);}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page