Editorial for Mock CCC '20 Contest 1 J5 - A Prime Problem
Submitting an official solution before solving the problem yourself is a bannable offence.
Brute force over the length of the prefix and the suffix. For a given length, determine if the given prefix is prime or not. If it is, then try to compute the next largest prime bigger than the suffix. Otherwise, find the next largest prime for the prefix and then pick the smallest prime for the length of the suffix.