Computer Science, asked by sanyogigosavi04, 8 months ago

First line contains an integer T denoting the number of test cases. Next T lines contains an integer N denoting the maximum price of the item present on Philaland.

Answers

Answered by aparnanidamanuri25
12

Answer:

#include<iostream>

using namespace std;

int main()

{

int N,T,i,j,sum,count;

cin>>T;

if(T>=1 && T<=100)

for(i=1;i<=T;i++)

{

 cin>>N;

 sum=0;

 count=0;

 j=1;

 if(N>=1 && N<=5000)

 while(sum<N)

 {

  sum += j;

  j++;

  count++;

 }

 cout<<count;

 cout<<endl;

}

return 0;

}

Explanation:

Answered by kirtan2746
0

Answer:

11111111111111111111111

Similar questions