Time Exceeded
Code
#include <iostream>
#include <vector>
#include <algorithm>
#define MODD 1000000007
#define ll long long
using namespace std;
int main() {
int T;
cin>>T;
for(int t=1;t<=T;t++) {
int N;
cin>>N;
ll ans = 0;
for(int x=1;x<=N;x++) {
// x*(t+1) <= N
int maxt = (N/x) - 1;
ans += maxt;
}
cout<<ans<<endl;
}
}
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:14:05
- Judged At
- 2025-07-14 17:14:05
- Judged By
- Score
- 0
- Total Time
- ≥1099ms
- Peak Memory
- ≥544.0 KiB