Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
37971 wangrl 【S】T1 C++ 通过 100 0 MS 248 KB 310 2025-06-08 13:57:34

Tests(60/60):


#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; }


测评信息: