spoj problem - classical

finding 1st, 101st,201st.... 1st mod 100 prime numbers below 10^8.