Cod sursa(job #3249890)

Utilizator Rares0netOnet Rares-Petru Rares0net Data 18 octombrie 2024 18:08:38
Problema Invers modular Scor 30
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.58 kb
//Rares 0net
using namespace std;
using ULL=unsigned long long int;
#ifdef RS
#include<d:\Rares0.hpp>
#else
#include<fstream>
const string N_file="inversmodular";
ifstream fin(N_file+".in");
ofstream fout(N_file+".out");
#define cin fin
#define cout fout
#endif
#define endl '\n'
#define INF 0x3f3f3f3f
#define f first
#define s second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
ULL N, M;
void Solve()
{
    cin>>N>>M;
    for(ULL i=1;i<=M; ++i)
		if(((ULL)N*i)%M==1)
            cout<<i<<' ';
}
main()
{
    Solve();
}