提交时间:2023-10-12 14:01:07
运行 ID: 106542
#include <bits/stdc++.h> using namespace std; int jishu=0; void hf(int g,int l){ if(g!=l){ int s = floor(g*l - floor(sqrt(g*l))); g-=l; l=s/g; jishu++; } else cout << jishu+1; return; } int main(){ int a,b; cin >> a >> b; int i = max(a,b),o=min(a,b); while (1){ hf(i,o); } cout << jishu; return 0; }