原题链接:https://leetcode-cn.com/problems/simplified-fractions/
class Solution {
public:
vector simplifiedFractions(int n) {
vector res;
for (int j = 2; j <= n; ++j) {
for (int i = 1; i < j; ++i) {
if (__gcd(i, j) == 1) {
string s = to_string(i) + "/" + to_string(j);
res.push_back(s);
}
}
}
return res;
}
};



