Skip to content

Instantly share code, notes, and snippets.

@abdalimran
Created February 12, 2016 19:09
Show Gist options
  • Save abdalimran/d4a091a44e2639cf7e28 to your computer and use it in GitHub Desktop.
Save abdalimran/d4a091a44e2639cf7e28 to your computer and use it in GitHub Desktop.
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: [email protected] */
#include<bits/stdc++.h>
using namespace std;
int extendedEuclid(int a, int b, int &x, int &y)
{
if(a==0)
{
x=0;y=1;
return b;
}
int x1,y1;
int d=extendedEuclid(b%a,a,x1,y1);
x=y1-(b/a)*x1;
y=x1;
return d;
}
int main()
{
ios_base::sync_with_stdio(false);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment