竞赛
考级
#include <bits/stdc++.h> using namespace std; double a,b,c,x; int main() { cin>>a>>b>>x; int cnt=3; if(a>x){ cnt++; } if(b>x){ cnt++; } while(c<x){ c=sqrt(pow(a,2)+pow(b,2)); a=b; b=c; cnt++; }cout<<cnt; return 0; }
✅ ❌ 80 20
提交答案之后,这里将显示提交结果~