ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1209. 1, 10, 100, 1000...

WA #2 plz help
Posted by jesmin akter 29 May 2014 19:42
#include <stdio.h>
#include <math.h>
 unsigned long long a[70000];
int main()
{
      unsigned long long i,k,n,x;
    scanf("%ull\n",&n);
for(i=0;i<n;i++)
{
scanf("%ull",&a[i]);
}
    for(i=0;i<n;i++)
{
k=(8*a[i]-7);
x=a[i]*a[i];
if(x==k)
        {
        printf("1 ");
        }
    else
        {
        printf("0 ");
        }

}
    return 0;
}