Page 7 of 7

### Re: 382 - Perfection getting WA

Posted: Fri Aug 01, 2014 7:31 pm
Read the problem statement and look at the sample output, there are two spaces after each number.
Post your updated code if you still want help. Also use the code blocks when posting code.

### Re: 382 - Perfection getting WA

Posted: Fri Aug 01, 2014 7:42 pm
Thanks a lot, Accepted after using two spaces .

### Re: 382 - Perfection

Posted: Tue Sep 30, 2014 10:10 am
1 < N < 100
So input 1 is invalid. Moreover, how can 1 be deficient?
1 = 1*1 *1 *1 *1......
1> summation of it product

### Re: 382 - Perfection

Posted: Mon Oct 06, 2014 10:08 pm
1 does appear in the judge's input and in order to get AC you need to print deficient.

### Re: 382 - Perfection

Posted: Fri Feb 06, 2015 3:51 pm
presentation error:

Code: Select all

``````#include<stdio.h>
int main()
{
long long int i,n,j,count=0;
for( ; ; )
{
long long int sum=0;
scanf("%lld",&n);
if(n==0)
{
printf("END OF OUTPUT\n");
break;
}
if(count!=1)
{
printf("PERFECTION OUTPUT\n");

}
count=1;

for(i=1;i<=n/2;i++)
{
if(n%i==0)
{
sum=sum+i;
}
}
if(sum==n)
{
printf("%lld  PERFECT\n",n);
}
else if(sum>n)
{
printf("%lld  ABUNDANT\n",n);
}
else if(sum<n)
{
printf("%lld  DEFICIENT\n",n);
}

}
return 0;
}``````

### Re: 382 - Perfection

Posted: Fri Feb 06, 2015 11:05 pm
Format counts: the echoed integers should be right justified within the first 5 spaces of the output line, followed by two blank spaces, followed by the description of the integer.