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

      

  • 相关阅读:
    python------面向对象介绍
    python------模块定义、导入、优化 ------->re模块
    python------模块定义、导入、优化 ------->hashlib模块
    Java过滤器Filter使用详解
    EL表达式、 jstl标签
    jsp 自定义标签中的Function函数
    JSP 自定义标签
    javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String
    JSP 中EL表达式用法详解
    JavaWEB
  • 原文地址:https://www.cnblogs.com/yinghualuowu/p/5208334.html
Copyright © 2011-2022 走看看