zoukankan      html  css  js  c++  java
  • Experimental Educational Round: VolBIT Formulas Blitz B

    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.

    Examples
    input
    1000 1000000
    output
    1011.060722383550382782399454922040
    题意什么都很直白就不解释了
    #include<stdio.h>
    //#include<bits/stdc++.h>
    #include<string.h>
    #include<iostream>
    #include<math.h>
    #include<sstream>
    #include<set>
    #include<queue>
    #include<map>
    #include<vector>
    #include<algorithm>
    #include<limits.h>
    #define inf 0x7fffffff
    #define INF 0x7fffffffffffffff
    #define lson l,m,rt<<1
    #define rson m+1,r,rt<<1|1
    #define LL long long
    #define ULL unsigned long long
    using namespace std;
    double  powl(double x, int n)
    {
        double pw = 1;
        while (n > 0)
        {
            if (n & 1)        // n & 1 等价于 (n % 2) == 1
                pw *= x;
            x *= x;
            n >>= 1;        // n >>= 1 等价于 n /= 2
        }
        return pw;
    }
    int main()
    {
        double n;
        double num;
        cin>>n>>num;
    
        printf("%.20f
    ",n*powl(1.000000011,num));
        return 0;
    }
    

      

  • 相关阅读:
    hdoj 4251 The Famous ICPC Team Again
    hdoj 1879 最小生成树之继续畅通工程
    并查集之Dragon Balls
    并查集之 Is It A Tree?
    hdoj 1874最短路之畅通工程续
    1040: Count
    hdoj 1874最短路之最短路径问题
    并查集之小希的迷宫
    并查集之食物链
    Ordered Fractions
  • 原文地址:https://www.cnblogs.com/yinghualuowu/p/5208334.html
Copyright © 2011-2022 走看看