Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
98661 CSYZ_YangXY SUM C++ 运行超时 10 1000 MS 240 KB 648 2023-08-16 12:15:18

Tests(2/20):


#include<bits/stdc++.h> #define int long long using namespace std; int t; int gcdd(int x,int y) { if(y==0) return x; return gcdd(y,x%y); } signed main() { // freopen("SUM.in","r",stdin); // freopen("SUM.out","w",stdout); cin>>t; while(t--) { int l,r; cin>>l>>r; int ans=0; for(int i=l;i<=r;i++) for(int j=i+1;j<=r;j++) for(int k=j+1;k<=r;k++) { if((i*j*k)/(gcdd(i,j)*gcdd(i*j/gcdd(i,j),k))-i-j-k>=0) ans++; } cout<<ans<<endl; } return 0; }


测评信息: