Search found 1 match

by crazy
Tue Jul 17, 2012 6:12 am
Forum: Volume 116 (11600-11699)
Topic: 11614 - Etruscan Warriors Never Play Chess
Replies: 13
Views: 4606

11614

it gave me wrong answer ...

Code: Select all

#include<stdio.h>
#include<math.h>
int main()
{
long int x,n,m,k,i;
scanf("%ld",&k);
for(i=0;i<k;i++)
{
    scanf("%ld",&n);
{
    m=(1+8*n)-1;
    x=sqrt(m)/2;
printf("%ld\n",x);
}}
return 0;
}

Go to advanced search