CG Infinity Interview Question

Prime number code to write in any lang