Cod sursa(job #2753055)
| Utilizator | Data | 20 mai 2021 21:01:55 | |
|---|---|---|---|
| Problema | Fractii | Scor | 10 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<fstream>
#include<map>
using namespace std;
ifstream f("fractii.in");
ofstream g("fractii.out");
map<float, int> list;
int n;
int main() {
f >> n;
for (float i = 1; i <= n; i++) {
for (float j = 1; j <= n; j++) {
list[i/j] = 1;
}
}
g << list.size();
}