This is the easy version of the problem. The only differences between the two versions of this problem are the constraints onkkk. You can make hacks only if all versions of the problem are solved. You are given integersnnn,pppandkkk.pppis guaranteed to be a prime number. ...
This is the hard version of the problem. The only differences between the two versions of this problem are the constraints onkkk. You can make hacks only if all versions of the problem are solved. You are given integersnnn,pppandkkk.pppis guaranteed to be a prime number. ...