1.题目描述:
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.
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 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.
1000 1000000
1011.060722383550382782399454922040
#include <cstdio>
#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <ctime>
using namespace std;
typedef long long ll;
#define INF 0x7fffffff
#define maxn 1111
#define eps 1e-6
#define pi acos(-1.0)
#define e 2.718281828459
#define mod (int)1e9 + 7;
#define jin 1.000000011
double mod_quick(double a, ll b)
{
double ans = 1;
while (b)
{
if (b & 1)
ans *= a;
a *= a;
b >>= 1;
}
return ans;
}
int main()
{
int n;
ll t;
while (scanf("%d%lld", &n, &t) != EOF)
{
double ans = mod_quick(jin, t);
printf("%lf\n", n * ans);
}
return 0;
}