网址:http://acm.nefu.edu.cn/test/problemshow.php
#include <iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
double a,b,u,v;
int n;
while(~scanf("%d%lf%lf%lf%lf",&n,&a,&b,&u,&v))
printf("%d\n",(int)(log10(1/sqrt(u*u+4*v))+(double)n*log10((u+sqrt(u*u+4*v))/2)+log10(b-a*((u-sqrt(u*u+4*v))/2))+1));
return 0;
}