UVA昨天上不去,今天一大早起来还是上不去 0.0

于是去ZOJ

这题大意就是半衰期。。。

取对数用到了换底公式。。。我都忘了这玩意了T T

上代码。。。

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double w ,d,n;
int count=1;
while(cin>>w>>d,w||d)
{
d/=w;
n=5730*log(d/810)/log(0.5);
if(n<10000)
n=int (n+50)/100*100;
else
n=int (n+500)/1000*1000;
cout<<"Sample #"<<count++<<endl<<"The approximate age is "<<n<<" years."<<endl<<endl;
}
return 0;
}

最新文章

  1. Nova PhoneGap框架 第一章 前言
  2. 解决Winform应用程序中窗体背景闪烁的问题
  3. Tomcat无法启动问题
  4. c#访问http接口的&quot;编码&quot;问题
  5. Docker on CentOS for beginners
  6. Python 字典和列表的对比应用
  7. 【POJ】【2420】A Star not a Tree?
  8. 【iOS开发】iOS7 兼容及部分细节
  9. 代码bug
  10. [php基础]PHP.INI配置:Session配置详细说明教程
  11. 超链接解决头部fixed问题
  12. 多工程:基于Maven的SSM(Spring,SpringMvc,Mybatis)整合的web工程(中)
  13. 面试(2)-java-se-HashSet和TreeSet
  14. bzoj 2298: [HAOI2011]problem a
  15. 第12章 X.509证书库的Fluent API - IdentityModel 中文文档(v1.0.0)
  16. 设置RHEL-7.0的运行级别
  17. python中TCP粘包问题解决方案
  18. css居中方法小结
  19. Android动画知识汇总
  20. 高性能缓存服务器Varnish

热门文章

  1. WebCollector爬取百度搜索引擎样例
  2. Android NDK课程录制完毕上线
  3. Windows下快速安装CACTI流量监控
  4. vim 帮助文档汉化
  5. js函数的属性和方法
  6. 记录一个mybatis编写xml遇到的错误:java.lang.unsupportedOperationException
  7. mybatis在XML中大于号转义字符
  8. halt---关闭正在运行的Linux操作系统。
  9. SNMP介绍,OID及MIB库
  10. Android-CheckBox 实现计算器