import java.io.*;
public class Demo2
{
public static void main(String []args)
{
try{
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
System.out.print("请输入一个数:");
String a=br.readLine();
int num=Integer.parseInt(a);
int sum=0;
for(int j=1;j<=num/2;j++)
if(num%j==0)
sum=sum+j;
if(sum==num)
System.out.println(num+"是完全数");
else
System.out.println(num+"不是完全数");
}catch(Exception e)
{
e.printStackTrace();
}
}
};
public class
{
public static void main(String args[])
{
int data,temp;
for(int i = 2; i < data; i++)
{
if((*data%i) == 0)
temp = temp + i;
}
if(temp == data)
System.out.println("该数字是完全数");
else
System.out.println("该数字不是完全数");
}
}