| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 330314 | 胡珂 | 【C5-1】判奇偶求和 | C++ | Compile Error | 0 | 0 MS | 0 KB | 395 | 2025-07-09 16:25:52 |
#include <bits/stdc++.h > using namespace std; int sb(int x){ int sum=0; for(int i =1;i <=x;i++) { if(x%i==0) { sum+=i; } } return sum; } int ji(int y){ int s=0; for(int i =1;i <= y;i++) { if(i%2==0) { s+=i; } } return s; } int main() { int n; cin >> n; if(n%2==0) { cout << sb(n); } else{ cout << ji(n); } return 0; }