Project Euler 123 - Prime Square Remainders

Official link: https://projecteuler.net/problem=123

Thought Process

We have discussed the Mathematics behind this problem in Problem 120

In this problem a = pn , and n = n obviously

Interactive Code

Enter a number (yourinput)

Code will output the least value of n for which the remainder exceeds yourinput