CodeForces - 630B Moore's Law (快速幂)
来源:互联网 发布:js position absolute 编辑:程序博客网 时间:2024/05/17 02:44
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
1000 1000000
1011.060722383550382782399454922040
#include<stdio.h>#include<math.h>#include<string.h>#include<algorithm>#define INF 0x3f3f3f3f#define ll long long#define N 10010#define M 1.000000011using namespace std;double ks(double x,int k){double ans=1.0;while(k){if(k&1)ans=ans*x;x*=x;k>>=1;}return ans;}int main(){int n,t;while(scanf("%d%d",&n,&t)!=EOF){double ans=ks(M,t);printf("%.7lf\n",ans*n);}return 0;}
- CodeForces 630 B. Moore's Law(快速幂)
- CodeForces - 630B Moore's Law (快速幂)
- Codeforces--630B--Moore's Law(快速幂)
- CodeForces 630B Moore's Law(摩尔定律,快速幂)
- Codeforces 630B Moore's Law
- CodeForces-630B. Moore's Law
- codeforces 630B Moore's Law
- CodeForces-630B:Moore's Law【水】
- codeforces 630B Moore's Law
- CodeForces-630 B. Moore's Law【数学】
- Codeforces 630 B. Moore's Law
- B - Moore's Law
- Codeforce 630B Moore's Law
- codeforce#630 B.Moore's Law
- MOORE'S LAW
- Moore's law & Hook's law
- Was Moore's Law Inevitable?
- 反摩尔定理 (Reverse Moore’s Law)
- 栈与队列的真相(概述)
- 怎么理解堆栈指针(Stack Pointer)
- HDFS的API操作
- [leetcode 137] Single Number II
- 2016.3.7
- CodeForces - 630B Moore's Law (快速幂)
- 第3章 jQuery之选择器
- c语言之指针调用注意
- Android 异步消息处理机制 让你深入理解 Looper、Handler、Message三者关系
- 框架源码学习笔记
- FPGA在深度学习的未来
- 通过el表达式配置使jsp直接调用java静态方法
- selector和shape的混搭使用
- Objective-C与Swift中通过字符串获取类的方法对比与实现