Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138569 hjx21115666 笨鸟先飞 C++ Accepted 1 MS 268 KB 276 2025-11-28 13:39:59

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { long int i,j,n,s,t; scanf("%ld",&t); while (t--) { scanf("%ld",&n); i=j=1; s=0; while (i<=n) { s=s+j; j=j+2; i++; } printf("%ld\n",s%10000); } return 0; }