概率书上原原本本的例子,要是不会建议去看书!!!! #include <iostream> #include <iomanip> using namespace std; int main() { int x, y; cin >> x >> y; int t = (y-x) * 60; double z; cin >> z; double a = (t-z)*(t-z); cout << fixed << setprecision(7) << 1-a/(t*t) << endl; return 0; }