#include <bits/stdc++.h> using namespace std; int main(){ int i,n,m,h=0,j; cin>>n>>m; for(i=n;i<=m;i++){ h=0; for(j=1;j<=i/2;j++){ if(i%j==0){ h=h+j; } } if(i==h){ cout<<i<<" "; } } return 0; } /************************************************************** Problem: 1136 User: 15159808820 Language: C++ Result: Accepted Time:12 ms Memory:2072 kb ****************************************************************/