Lieges of Legendre

Problem Name:
Lieges of Legendre
Site:CodeForces
Links:
Tags:
Problem setters: