Help me in solving FLOW009 problem

My issue

why is my code not giving correct answer? Which test cases would fail for this code?

My code

#include <bits/stdc++.h>
#include <iostream>

using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    int quan;
	    float p;
	    cin>>quan>>p;
	    if(quan>1000) cout<<quan*p*0.9<<endl;
	    else cout<<quan*p<<endl;
	}
	return 0;
}

Problem Link: FLOW009 Problem - CodeChef

@hp_68
your logic is correct but u have to print the answer upto 6 decimal values.
like this ;

#include <bits/stdc++.h>
#include <iostream>

using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    int  quan;
	    int p;
	    cin>>quan>>p;
	    double ans=p*quan*1.0;
	    if(quan>1000)
	       ans=ans*0.9;
	    cout<<fixed<<setprecision(6)<<ans;
	    cout<<endl;
	}
	return 0;
}

thank you!!