codeforces 630B Moore's Law
2016-03-09 19:51
375 查看
Moore's Law
Description
The city administration of IT City decided to fix up a symbol of scientific and technical progress in the city's main square, namely an indicator board that shows the effect of Moore's law in real time.
Moore's law is the observation that the number of transistors in a dense integrated circuit doubles approximately every 24 months. The implication of Moore's law is that computer performance as function
of time increases exponentially as well.
You are to prepare information that will change every second to display on the indicator board. Let's assume that every second the number of transistors increases exactly 1.000000011 times.
Input
The only line of the input contains a pair of integers n (1000 ≤ n ≤ 10 000) and t (0 ≤ t ≤ 2 000 000 000) —
the number of transistors in the initial time and the number of seconds passed since the initial time.
Output
Output one number — the estimate of the number of transistors in a dence integrated circuit in t seconds since the initial time. The relative error of your answer should not be greater than 10 - 6.
Sample Input
Input
Output
题意:求n*1.000000011的t次方。
代码:
Description
The city administration of IT City decided to fix up a symbol of scientific and technical progress in the city's main square, namely an indicator board that shows the effect of Moore's law in real time.
Moore's law is the observation that the number of transistors in a dense integrated circuit doubles approximately every 24 months. The implication of Moore's law is that computer performance as function
of time increases exponentially as well.
You are to prepare information that will change every second to display on the indicator board. Let's assume that every second the number of transistors increases exactly 1.000000011 times.
Input
The only line of the input contains a pair of integers n (1000 ≤ n ≤ 10 000) and t (0 ≤ t ≤ 2 000 000 000) —
the number of transistors in the initial time and the number of seconds passed since the initial time.
Output
Output one number — the estimate of the number of transistors in a dence integrated circuit in t seconds since the initial time. The relative error of your answer should not be greater than 10 - 6.
Sample Input
Input
1000 1000000
Output
1011.060722383550382782399454922040
题意:求n*1.000000011的t次方。
代码:
<span style="font-size:14px;">#include<stdio.h> #include<math.h> #define D 1.000000011 int main() { int n,t; double a; while(scanf("%d%d",&n,&t)!=EOF) { a=pow(D,t); printf("%lf\n",n*a); } return 0; }</span>
相关文章推荐
- 国外程序员推荐:每个程序员都应读的书
- 从机器学习谈起
- 蓝桥杯---2012--比酒量(暴力)
- 蓝桥杯---2012--比酒量(暴力)
- Codeforces Round #345 (Div. 2)
- Java - eclipse 使用日记
- CentOS6.5 配置java环境
- OptiX WDM 系统常用指标测试
- this关键字的三种常见用法
- this关键字的三种常见用法
- 用循环求
- Power Calculus
- 函数参数的传递
- HeadFirst设计模式之单例模式
- 【鬼脸原创】谷歌扩展--知乎V2.0
- [Feyat Cup 1.0][JZOJ3338]法法塔的奖励
- 关于svn检出的项目无法运行的问题
- [译]Kinect for Windows SDK开发入门(十三):语音识别 下
- 自定义轮播图控件
- NSURLSession学习