提交时间:2025-06-08 13:57:34
运行 ID: 37971
#include<bits/stdc++.h> #define ll long long using namespace std; ll t,m,tot,ans; void f(){ ll tmp=__gcd(ans,tot); ans/=tmp; tot/=tmp; } int main(){ cin>>t>>m; tot=t*m; if(t>m){ ans=((m+1)*m)/2; }else{ ans=(m+m-t+1)*(t)/2; } f(); printf("%lld/%lld",ans,tot); return 0; }