| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 309391 | 123456 | 【C3-8】完数 | C++ | Accepted | 100 | 5 MS | 256 KB | 254 | 2025-02-19 19:50:36 |
#include<iostream> using namespace std; int main(){ int n,s; cin>>n; for(int i=1;i<=n;i++){//遍历小于等于n的数字 s=0; for(int j=1;j<i;j++){ if(i%j==0) s+=j;//j的i的因子 } if(s==i) cout<<i<<endl; } return 0; }