Time Exceeded
Code
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int t;
cin >> t;
while (t--){
ll n, S = 0;
cin >> n;
for (int i = 1; i <= n / 2; i++){
S += (n / i - 1);
}
cout << S << 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:23:10
- Judged At
- 2025-07-14 17:23:10
- Judged By
- Score
- 0
- Total Time
- ≥1099ms
- Peak Memory
- ≥532.0 KiB