Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
75399 sh25_shenpy 求正整数2和n之间的完全数 C++ 通过 0 MS 240 KB 321 2025-12-06 13:20:55

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int main( ) { int h,s=0; cin>>h; for(int i=6;i<h;i++){ for(int w=1;w<=1.0*i/2;w++){ if(i%w==0){ s+=w; } } if(s==i){ cout<<s<<endl; } s=0; } return 0; }


测评信息: