Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
48862 冯诚阳 笨鸟先飞 C++ Accepted 2 MS 272 KB 427 2023-06-16 15:14:19

Tests(1/1):


Code:

#include <iostream> #include <algorithm> #include <vector> #include <string> #include <math.h> using namespace std; int main() { int t, s, v; cin >> t; while (t--) { int n; cin >> n; s = 0; v = 1; for (int i = 0; i < n; i++) { s = (s+v)%10000; v = v + 2; } printf("%d\n", s); } return 0; }