简单模拟,大力出奇迹 #include <cstdlib> #include <iostream> #include <sstream> #include <string> #include <bits/stdc++.h> using namespace std; long long gcd(long long a, long long b){ return b? gcd(b, a%b) : a; } int main() { string a, b, s; while (getline(cin, s)) ...