The Last Digit[LASTDIG] [SPOJ]

Question Link is :-1


My Solution Link is :-

I think my logic is correct. Why am i getting Wrong Answer.
Help Me.

Try

1
2 4
1 Like

Done. A silly mistake it would have been (onesonesones*ones)%10;. Thanks.