递归
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <math.h>
using namespace std;
int shu(int a,int b){
if(a%b==0)
return b;
return shu(b,a%b);
}
int main(){
int n,m;cin >>n>>m;
cout <<shu(n,m);
}
递归
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <math.h>
using namespace std;
int shu(int a,int b){
if(a%b==0)
return b;
return shu(b,a%b);
}
int main(){
int n,m;cin >>n>>m;
cout <<shu(n,m);
}