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

      

  • 相关阅读:
    centos同步北京时间
    django-migrate一败再败
    Mac-无法进入mysql,你这样做就对了
    celery beat
    devops--django+ldap
    本地终端连接到远程服务器
    Mac--ModuleNotFoundError: No module named 'magic'
    一站式解决Mac--socket.gaierror: [Errno 8] nodename nor servname provided, or not known
    docker--常用指令
    Mac--管理mysql、redis服务的常用命令
  • 原文地址:https://www.cnblogs.com/yinghualuowu/p/5208334.html
Copyright © 2011-2022 走看看