Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96825 | 只因你太美(Ikun 真爱粉) | 数列求和 | C++ | Wrong Answer | 1 MS | 272 KB | 434 | 2024-11-09 16:34:21 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std;//1 2 4 8 long long ma=0,f[100001]={1,2,4}; int main(){ long long m; cin>>m; for(int i=2;i<m;i++){ f[i]=f[i-1]*2; ma+=f[i]; } cout<<ma+1+2; return 0; }
------Input------
1
------Answer-----
1
------Your output-----
3