1 条题解
-
0
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); double a, b, U; cin >> a >> b >> U; int ans = 1; if (a <= U) ans++; while (b <= U) { ans++; double t = sqrt(a * a + b * b); a = b; b = t; } cout << ans << '\n'; return 0; }
- 1
信息
- ID
- 5291
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 10
- 标签
- 递交数
- 5
- 已通过
- 3
- 上传者
粤公网安备44195502000252号