Cod sursa(job #1190254)
Utilizator | Data | 24 mai 2014 20:27:41 | |
---|---|---|---|
Problema | Fractii | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <fstream>
using namespace std;
void Citire (long unsigned &N)
{
ifstream fin ("fractii.in");
ofstream fout("fractii.out");
fin>>N;
fin.close ();
int c=0;
for (int i=1;i<=N;i++)
for (int j=1;j<=N;j++)
if (i%j!=0 || (j==1 && i!=1))
c++;
fout<<c;
fout.close ();
}
int main ()
{
long unsigned N;
Citire(N);
return 0;
}