public class perfektatal
{
public static void main(String[] args)
{
long x = 0;
long sum = 0;
for(long n = 1; n < 100000; n ++)
{
for(long factor = 1; factor
if(x==0)
{
sum+=factor;
}
}
if(sum==n){
System.out.println("Bas: " + sum);//sum eller n kan printas
System.out.println("\n");
for(int factor = 1; factor
if(x==0)
System.out.println(factor);
}
}
sum=0;
}
}
}