1 条题解

  • 0
    @ 2024-11-19 23:16:43
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,i,j,f=0;
    	cin>>n;
    	for(i=2;i<=n;i++)
    	{
    		for(j=1;j<i;j++)
    		{
    			if(i%j==0)
    			{
    				f=f+j;
    			}
    		}
    		if(f==i)
            {
            cout<<i<<endl;
            }
            f=0;
    	}
    	return 0;
    }
    
    • 1

    信息

    ID
    93
    时间
    1000ms
    内存
    256MiB
    难度
    2
    标签
    递交数
    42
    已通过
    26
    上传者