Time Exceeded
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t; cin>>t;
while(t--)
{
int n; cin>>n;
ll ans=0;
for(int i=1; i<n; i++)
{
ans+=(n/i)-1;
}
cout<<ans<<endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1206 D1. GCD equal Absolute Value (Easy Version)
- Contest
- Educational Round 1
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-07-14 17:39:44
- Judged At
- 2025-07-14 17:39:44
- Judged By
- Score
- 0
- Total Time
- ≥1100ms
- Peak Memory
- ≥564.0 KiB