zoukankan      html  css  js  c++  java
  • codeforces 630B Moore's Law

    B. Moore's Law
    time limit per test
    0.5 seconds
    memory limit per test
    64 megabytes
    input
    standard input
    output
    standard output

    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 24months. 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

     题意:给两个数n,t,求n*1.000000011的t次方

    #include<stdio.h>
    #include<string.h>
    #include<string>
    #include<math.h>
    #include<algorithm>
    #define LL long long
    #define PI atan(1.0)*4
    #define DD double
    #define MAX 100100
    #define mod 10007
    #define dian 1.000000011
    using namespace std;
    int main()
    {
        int n,j,i,t;
        DD m;
        while(scanf("%d%d",&n,&t)!=EOF)
        {
        	m=pow(dian,t);
        	m=n*m;
        	printf("%lf
    ",m);
        }
    	return 0;
    } 
    

      

  • 相关阅读:
    UOJ#424. 【集训队作业2018】count
    框架的 总结(nop)------添加功能
    c# 调用分页(控制器端的)与时间的格式
    c# 通过关键字查询
    c#导入导出 插入数据到用户表(nop框)
    Nop权限的使用
    联合结果集的原则
    简单的结果集联合
    UNION ALL
    联合结果集
  • 原文地址:https://www.cnblogs.com/tonghao/p/5230353.html
Copyright © 2011-2022 走看看