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;
}
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.
If you’re referring to this: looks like it “submitted” perfectly fine; it just gave the wrong answer
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)
if i’m wrong please correct me.