Cod sursa(job #3322897)
| Utilizator | Data | 16 noiembrie 2025 10:25:31 | |
|---|---|---|---|
| Problema | Suma divizorilor | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("inversmodular.in");
ofstream fout ("inversmodular.out");
int main()
{
long long N,P;
fin>>N>>P;
for(int i=1;i<P;i++)
{
long long x=i*N;
if(x%P==1)
{
fout<<i;
i=P;
}
}
return 0;
}
