正文
增加 2 行删除 2 行
16 行未改动1718192021222324254 行未改动303132333435363716 行未改动由于正弦函数值域为 $[-1,1]$,若 $x>1$,则取 $x=1$,保证有解。## AC code :```cpp# include <bits/stdc++.h>//万能头文件using namespace std;int t;double v,d;int main () {4 行未改动for (int i = 1;i <= t;i++) {cin >> v >> d;double x = d * 9.8 / (v * v);if(x > 1.0) x = 1.0;cout << "Case #" << int(i) << ": " << 0.5 * asin(x) * 180.0 / acos(-1.0) << endl;//直接用公式写}return 0;}16 行未改动1718192021222324254 行未改动303132333435363716 行未改动由于正弦函数值域为 $[-1,1]$,若 $x>1$,则取 $x=1$,保证有解。## AC code :```cpp# include <bits/stdc++.h>//万能头文件using namespace std;int t;double v,d;int main () {4 行未改动for (int i = 1;i <= t;i++) {cin >> v >> d;double x = d * 9.8 / (v * v);if(x > 1.0) x = 1.0;cout << "Case #" << int(i) << ": " << 0.5 * asin(x) * 180.0 / acos(-1.0) << endl;//直接用公式写}return 0;}