Create 524.cpp

Prime Ring Problem