Cod sursa(job #2672928)

Utilizator tact1m4n3Dicu Tudor Andrei tact1m4n3 Data 15 noiembrie 2020 14:45:06
Problema Ciurul lui Eratosthenes Scor 0
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.25 kb
#include <iostream>
#include <vector>
#include <fstream>

std::ifstream infile("ciur.in");
std::ofstream outfile("ciur.out");

int main()
{
	int n;
	infile >> n;

	for (int i = 2; i < n; i++)
	{
		int t = n / i;
		n -= t;
	}

	outfile << n;
}