Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5974 邓小龙 笨鸟先飞 C++ Wrong Answer 0 MS 264 KB 488 2024-12-27 15:50:24

Tests(0/1):


Code:

#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; int main(){ long long v=1,n,m,s=0; cin>>n; for(int i=1;i<=n;i++){ s=0,v=1; cin>>m; for(int j=1;j<=m;j++){ s=(s+v); v=(v+2); } cout<<s<<endl; } return 0; }


Run Info:

------Input------
25 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 50 100 1000 5999 19999 50000 99999
------Answer-----
9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 2500 0 0 8001 1 0 1
------Your output-----
9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 2500 10000 1000000 35988001 399960001 2500000000 9999800001