Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
8150 | D班-西瓜 | 完数判断 | C++ | 通过 | 100 | 102 MS | 260 KB | 239 | 2025-03-26 14:31:54 |
#include <bits/stdc++.h> using namespace std; int main() { int x,sum=0; cin >> x; for(int i = 1; i<x; i++) { if(x%i==0) { sum+=i; } } if(sum == x) { cout << "yes"; } else { cout << "no"; } return 0; }