Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include <iostream>
#include <cstdlib>
using namespace std;
void main() {
int n, t;
long double res;
cin >> n >> t;
res = pow(1.000000011, t) * n;
cout << res << endl;
}
Copy The Code &
Try With Live Editor
Input
1000 1000000
Output
1011.060722383550382782399454922040
Demonstration
Codeforces Solution-Moore's Law-Solution in C, C++, Java, Python