Learning course: Arrays using C++
Problem Link: CodeChef: Practical coding for everyone
Feedback
When trying to debug, it says test cases could not be found
Learning course: Arrays using C++
Problem Link: CodeChef: Practical coding for everyone
When trying to debug, it says test cases could not be found
@royalmadhatter
Plzz refer my code for better understanding of the logic.
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int a[n];
int mn=100,cnt=0;
for(int i=0;i<n;i++)
{
cin>>a[i];
if(a[i]<mn)
mn=a[i];
}
for(int i=0;i<n;i++)
{
if(a[i]==mn)
cnt++;
}
cout<<n-cnt<<endl;
}
return 0;
}