Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
12298 陈颖钧 求完全数的个数 C++ 通过 100 1 MS 264 KB 254 2025-07-09 16:58:32

Tests(1/1):


#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; }


测评信息: