这个题我有思路,但是不适用,因为数太大了。我看了人家的结题报告。我知道大数可以小比
就是巧妙的利用了对数的知识;;23:19 2012/8/3 星期五
#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
double product;
int year;
while(cin>>year)
{
product = 0;
if(!year)break;
double bit = pow(2, (year-1940)/10)*log(2);
int i;
for( i = 1; product<bit ; i++)
product += log(i);
cout<<i-2<<endl;
}
return 0;
}