2018, XI Samara Regional Intercollegiate Programming Contest 解题报告
2018,XISamaraRegionalIntercollegiateProgrammingContest传送门A.RestoringNumbers题意:给出两个数aaa和bbb的和sss和最大公因数ggg,要你求出任意一组aaa和bbb的解。题解:我们可以知道gcd(a,b)=ggcd(a,b)=ggcd(a,b)=g,则我们假设a=p∗ga=p*ga=p∗g,b=q∗gb=q*gb=q∗g,