• 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;
    }
    

      

  • 相关阅读:
    新的开始
    0基础学习ios开发笔记第二天
    0基础学习ios开发笔记第一天
    Linux内核中SPI/I2c子系统剖析
    Linux内核之mmc子系统-sdio
    系统调用和中断处理的异同(以Linux MIPS为例)
    开始lisp的旅程
    Linux kernel驱动相关抽象概念及其实现 之“bus,device,driver”
    Linux kernel驱动相关抽象概念及其实现 之“linux设备模型kobject,kset,ktype”
    /etc/udev
  • 原文地址:https://www.cnblogs.com/yinghualuowu/p/5208334.html
Copyright © 2020-2023  润新知