| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 12386 | A班-袁誉晏 | 判奇偶求和 | C++ | Accepted | 100 | 1 MS | 264 KB | 410 | 2025-07-10 20:45:11 |
#include <bits/stdc++.h> using namespace std; int n(int a) { int sum = 0; if (a%2==0) { for (int i = 1; i <= a; i++) { if (a % i == 0) { sum += i; } } } else { for (int i = 2; i <= a; i += 2) { sum += i; } } return sum; } int main() { int b; cin>>b; cout<<n(b); return 0; }