http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0024&lang=jp
#define _USE_MATH_DEFINES #include <iostream> #include <vector> #include <list> #include <cmath> using namespace std; int main () { double N = 0; while (cin >> N) { int i = 1; while (1) { double hoge = 5 * i - 5; double v = 9.8 * sqrt(hoge / 4.9); if (v > N) { break; } i++; } cout << i << endl; } return 0; }