#include<bits/stdc++.h> using namespace std; int main() { double x,n; double fact=1.0,e=0.0; cin>>x>>n; int i; for(i=1;i<=n;i++) { fact=fact*i; e+=pow(x,i)/fact; } cout<<e<<endl; return 0; }
No comments