Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86433 小徐老师 笨鸟先飞 C++ Accepted 1 MS 272 KB 366 2024-07-25 09:57:56

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; while(T--) { int n; cin >> n; int s = 0; int p = 1; for(int i = 0; i < n; ++i) { s += p; s %= 10000; p += 2; } cout << s << endl; } return 0; }