原题大意
找到一个α,使得f(1/2+α)最大。
可以看成两点之间距离,中点处最大。
程序代码
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b){
return b == 0 ? a : gcd(b, a%b);
}
int main(){
//freopen("input.txt", "r", stdin);
ios::sync_with_stdio(false);
cin.tie(0);
ll n, m;
while(cin >> n >> m){
ll t1 = gcd(n, m);
ll t2 = 2 * n * m;
ll num = gcd(t1, t2);
ll p = t1 / num;
ll q = t2 / num;
cout << p <<"/" << q <<endl;
}
return 0;
}