#include <cstdio>
#include <cmath>
int main() {
int year;
while (scanf("%d", &year), year) {
int n = (year - 1940) / 10;
double k = pow(2.0, n) * log(2.0);
double sum = 0;
int i;
for (i = 1; sum <= k; i++) {
sum += log(i*1.0);
}
printf("%d\n", i - 2);
}
return 0;
}
UVA 10916 Factstone Benchmark
最新推荐文章于 2020-06-11 07:50:51 发布