630C Codeforces - Lucky Numbers
Solution in c++
#include <iostream>
#include <cmath>
using namespace std;
long long int sol,n;
int main(){
cin>>n;
for(int i=1;i<=n;i++)sol+=pow(2,i);
cout<<sol;
}
My name is Mo.Sobhy ,I study at School excelling high school in Ain Shams ,Cairo
My hobbies is programming ,and web development ,playing chess and writing horror stories.
0 التعليقات:
إرسال تعليق