Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128101 唐诗阳 数列求和 C++ Wrong Answer 1 MS 272 KB 315 2025-08-01 20:10:56

Tests(2/5):


Code:

#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int m=1,n,s=1; cin>>n; for(int i=1;i<n;i++){ m+=s*2; s*=2; } cout<<m; return 0; }


Run Info:

------Input------
40
------Answer-----
1099511627775
------Your output-----
-1