33 lines
389 B
C++
33 lines
389 B
C++
#include <bits/stdc++.h>
|
|
#define endl '\n'
|
|
using namespace std;
|
|
|
|
double a, b, t;
|
|
int cnt = 3;
|
|
|
|
int main(){
|
|
cin >> a >> b >> t;
|
|
|
|
double curr = 0;
|
|
|
|
if(a > t){
|
|
cout << 1;
|
|
return 0;
|
|
} else if(b > t){
|
|
cout << 2;
|
|
return 0;
|
|
}
|
|
|
|
curr = sqrt(a * a + b * b); // µÚÈýÏî
|
|
while(curr <= t){
|
|
cnt++;
|
|
a = b;
|
|
b = curr;
|
|
curr = sqrt(a * a + b * b);
|
|
}
|
|
|
|
cout << cnt;
|
|
return 0;
|
|
}
|
|
|