Cod sursa(job #2276882)
Utilizator | Data | 5 noiembrie 2018 16:09:57 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.32 kb |
#include <bits/stdc++.h>
#pragma GCC optimize("03")
#define ll long long
using namespace std;
ifstream in("tg.in");
ofstream out("tg.out");
ll n, ans, nr[4000100];
int main() {
in >> n;
for (int i = 1; i < n - 1; i++)
for (int j = i + 1; j * j < n; j++)
if ((j * j) / i <= n)
ans++;
out << ans;
return 0;
}