Cod sursa(job #1701237)

Utilizator N00bSh4d0wRodion Raskolnikov N00bSh4d0w Data 12 mai 2016 15:04:25
Problema Algoritmul lui Euclid Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.2 kb
#include <iostream>
using namespace std;
int a,b,m,T;
int main()
{
    cin>>T;
    for (T;T>=1;T--)
        {
    cin>>a>>b;
while (b!=0)
{m=a%b;
    a=b;
    b=m;
}
cout<<a<<'\n';
}}