提交时间:2020-08-22 12:18:12

运行 ID: 6043

#include <iostream> #include <cstdio> using namespace std; int main() { double m, a = 0, h = 0, n = 2, c = n*0.98 ; cin >> m; for(int i=0; i<1000; i++) { h = a + n + c; n = c; c = n*0.98; a = h; if ( m < h) { cout << i; return 0; } } return 0; }