提交时间:2020-08-22 11:23:52
运行 ID: 6035
#include <iostream> #include <cstdio> using namespace std; int main() { double m, h = 0, n = 2, c = n*0.98 ; cin >> m; for(int i=0; i<100; i++) { h = h + n + c; n = c; c = n*0.98; if ( m < h) { cout << i; return 0; } } return 0; }