Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
98628 CSYZHeYixuan SUM C++ 运行超时 10 1000 MS 260 KB 409 2023-08-16 12:09:14

Tests(2/20):


#include<bits/stdc++.h> using namespace std; #define int long long int T; signed main(){ ios::sync_with_stdio(0); cin>>T; while(T--){ int l,r,ans=0; cin>>l>>r; for(int i=l;i<=r;i++){ for(int j=i+1;j<=r;j++){ for(int k=j+1;k<=r;k++){ int mul=__gcd(i,j)*__gcd(i*j/__gcd(i,j),k); if(i*j*k>=i*mul+j*mul+k*mul) ans++; } } } cout<<ans<<'\n'; } return 0; }


测评信息: