last digit of 2017! = last digit of (2^(A))x A! x B! where A is largest multiple 5 of 2017 which is 2015 and B is 2 ie., remainder
= remainder of (2^(403))x 403! x 2! ------ 1 { remainder of 2! is 2 and 2^403 is 8 (powers of 2 are cyclic between 2, 4, 8 & 6} }
For the remainder of 403! (2^(80))x 80! x 3! ------ 2
For the remainder of 80! (2^(16))x 16! x 0! ------ 3
For the remainder of 16! (2^(3))x 3! x 1! ------ 4
=> 8 x 6 x 1 = 48 ===> 8 ( the last digit }.
resubstituting 4's remainder back in 3 and working back we get the last non zero digit of 2017! as 8.