Cod sursa(job #1327861)
Utilizator | Data | 27 ianuarie 2015 12:07:06 | |
---|---|---|---|
Problema | Fractii | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
//Diaconescu Ion
#include <iostream>
using namespace std;
int n,q,p,nr;
int main()
{cin>>n;
nr=0;
for (p=1;p<=n;p++)
{
for (q=1;q<=n;q++)
{
nr=nr+1;
if (p&&q!=1 && p%q==0) nr=nr-1;
}
}
cout<<nr;
return 0;
}