NEFU 461 递推式转通项公式
网址:https://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;
}
最后更新:2017-04-03 16:48:50
上一篇:
解决maven web项目倒入eclipse不出现Maven Dependencies 和 Java System Library的问题
下一篇:
Linux中图形模式与文本模式切换
LAMP编译:解决 64 CPU 位元 compiler 时 zlib 出现/usr/local/lib/libz.a(crc32.o)造成的问题 .
云栖大会明日将有大动作,阿里巴巴将发布物联网嵌入式操作系统
Android研究院之ListView原理学习与优化总结
J2EE中Servlet操作cookie
ios ipa apple company 开发者账号申请分享攻略
android中的ellipsize
SQL Server vs Oracle 简单语法比较
Cat.0实现更低功耗、更低成本物联网设备连接到LTE网络
Java循环:想说爱你不容易
Windows 8怎么了?戴尔都想抛弃你了