https://acm.hdu.edu.cn/showproblem.php?pid=3579 一些坑点.首先是如果说最后求得到的结果为0,那么在数学意义上这是正确的,0对于任何的确是最小的整数解,但实际意义正整数就并非如此了,如果为0,那么下一个最小解为最小公倍数. 一个技巧,先除再乘防止爆炸. 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 ll ncases,n,x,y; 5 const…