LASTDIGIT2 fixed and remixed by *yuko*

var s:string(999);i,n:word;begin repeat
readln(s);val(copy(s,length(s)-2),n,i);writeln((ord(s[pos(^`,s)-1])-48)pow(3and(n+3)+1)mod 10)until 0>0end.

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

download

return to the top page