LASTDIGIT2 fixed and remixed by m.ukai

let(@)i n=n*[|n*n*n;1;n;n*n|].(i mod 4)mod 10
let(!),c=String.length,Char.code;;while 1=1do
Scanf.scanf"%s %s "(fun a b->Printf.printf"%d
"(c b.[!b-2]*2+c b.[!b-1]@c a.[!a-1]-8))done

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

download

return to the top page