DescriptionGivenaprimeP,2<=P<231,anintegerB,2<=B<P,andanintegerN,2<=N<P,computethediscretelogarithmofN,baseB,moduloP.Thatis,findanintegerLsuchthat[crayon-66eb2363a71e2878632017/]InputReadseverallinesofinput,eachcontainingP,B,Nseparatedbyaspace,Outputforeachlineprintthelogarithmonaseparateline.Ifthereareseveral,printthesmallest;ifthereisnone,print"nosolution"...
近期评论