Why can't i submit this program ?is anything wrong?

question linkhttps://www.codechef.com/problems/FSQRT
#include <iostream.h>
#include<math.h>

using namespace std;

int main() {
int t,n,a=0;
cin>>t;
while(t–)
{
cin>>n;
a=(int)sqrt(n);

}

cout<<a;

return 0;

}

share the question link and the issue while submitting the code.

1 Like

https://www.codechef.com/problems/FSQRT

If you’re referring to this: looks like it “submitted” perfectly fine; it just gave the wrong answer :slight_smile:

Consider the test input:

2
1
4

first there is no such file named iostream.h and second you have to print at each test cases(inside the while loop)

1 Like

if i’m wrong please correct me.