zoj1242
来源:互联网 发布:阿里云学校 编辑:程序博客网 时间:2024/04/29 22:58
#include<iostream>#include<cmath>using namespace std; int main() { const int a=810; const int hlc=5730; int year,dec,w,d,count=1; while(cin>>w>>d) { if(d==0&&w==0) return 0; year=hlc*log(a*w/d)/log(2);//换底公式的应用,求解任意对数 if(year<=10000) year=100*(int)(year/100+0.5); else year=1000*(int)(year/1000+0.5);//注意四舍五入的方法 cout<<"sample#"<<count<<endl; cout<<"The approximate age is "<<year<<endl; count++; } return 0;
- zoj1242
- zoj1242
- zoj1242
- zoj1242
- [水]ZOJ1242
- zoj1242——Carbon Dating
- 跳槽
- CodeIgniter中Router类的两个方法
- 请问高手为什么我写的矩阵键盘为什么显示10的时候就挑不出去了?
- note
- 显示或隐藏MacOS中的隐藏文件
- zoj1242
- .net 开源搜索引擎,C#搜索引擎开源,C#开源搜索引擎,.net搜索引擎开源
- 利用url进行http请求
- h.264 rtp打包
- .net 开源搜索引擎,C#搜索引擎开源,C#开源搜索引擎,.net搜索引擎开源
- 转载 计算机视觉领域的一些牛人博客,超有实力的研究机构等的网站链接
- sgu326告诉已赢的场数,还剩的场数,某人是否可能得冠军
- 单链表的一些操作
- HDOJ 2899 Strange fuction解题报告