| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 12298 | 陈颖钧 | 求完全数的个数 | C++ | Accepted | 100 | 1 MS | 264 KB | 254 | 2025-07-09 16:58:32 |
#include<bits/stdc++.h> using namespace std; int n,i,j; int yin(int n){ int a=1,s=0; while(a<n){ if(n%a==0){ s+=a; } a++; } return s; } int main(){ cin>>n; for(i=1;i<=n;i++){ if(yin(i)==i){ j++; } } cout<<j; }