提交时间:2023-10-07 13:18:14
运行 ID: 105539
#include<bits/stdc++.h> using namespace std; int qiu(int a,int b,int shu=0) { if(a>b) { shu++; return qiu(a-b,b,shu); } if(a<b) { shu++; return qiu(a,b-a,shu); } if(a==b) { shu++; return shu; } } int main() { int m,n; cin>>m>>n; cout<<qiu(m,n,0); return 0; }