#include <bits/stdc++.h> using namespace std; //辗转相除法求公约数 int yueshu(int a, int b){ if(a < b) swap(a, b); int num = b; while(a%b != 0){ num = a % b; a = b; b = num; } return b; } int main(){ int a, b; while(cin >> a >> b){ ...