Cod sursa(job #1752997)

Utilizator epermesterNagy Edward epermester Data 5 septembrie 2016 17:40:26
Problema Fractii Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.28 kb
#include <iostream>
#include <fstream>

using namespace std;

int main() {
	int N;
	ifstream in("fractii.in");
	in >> N;
	int k = 0;
	for (int sz = 1;sz <= N;sz++) {
		for (int n = 1;n <= N;n++) {
			if (!sz%n) k++;
		}
	}
	ofstream out("fractii.out");
	out << k;	
}