11614

Do you want to discuss about these problems? Go now!
Users are shared (no need to re-register).

Moderator: Board moderators

11614

Postby crazy » Tue Jul 17, 2012 6:12 am

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;
}
crazy
New poster
 
Posts: 1
Joined: Tue Jul 17, 2012 5:48 am

Re: 11614

Postby brianfry713 » Wed Jul 18, 2012 12:10 am

Doesn't match the sample I/O.
brianfry713
Guru
 
Posts: 1765
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA


Return to ACM ICPC Archive Board

Who is online

Users browsing this forum: No registered users and 1 guest