buy 1 get 1 problem

i CRACKED THE PROBLEM WHICH WS RUNNING PERFECTLY AND GIVING RESULTS. BUT AFTER SUBMITTING THE GIVEN PROGRAM WAS RECOGNISED TOP BE WRONG?? PLEASE HELP ME OUT

#include<stdio.h>
#include<string.h>

int main()
{
    char s[201];
    int out[120];
    int r,q,i,j,c,a,k,t,m,l,g,f,d;
    k=0;
    c=0;
    d=0;
    printf("enter number of test cases \n");
    scanf("%d",&t);

    for(m=1;m<=t;m++){
    printf("enter string sequence \n");
    scanf("%s",&s);
    l=strlen(s);
    g=65;
    f=90;
    while(d!=2){
    for(i=g;i<=f;i++){
        for(j=0;j<l;j++)
            {
            a=s[j];
            if(a==i)
            c++;
            }
        r=c%2;
        q=c/2;
        k=k+r+q;
        c=0;
    }
    d++;
    g=g+32;
    f=f+32;
    }
    out[m-1]=k;
    k=0;
    d=0;
}
    for(i=0;i<m-1;i++)
    {


        printf("%d \n",out[i]);
    
        }
    
        return 0;
    }

tell me which programmer on codechef prompts the user with am message. the answer is no one. you want to have print any messages dude it’s assumed that the user knows what to enter

and i haven’t even had a good look at your algo

printf(“enter number of test cases \n”);
printf(“enter string sequence \n”);

Get rid of those unnecessary printf()s`. On code chef and other Competitive programming sites, you must not add statements like these.

Check the problem page and look at the input and output there. Your output and input should match the same format as that.

If the outupt for a certain input is
3
5

You should output just that. there is no need for those unnecessary output’s like yours. Those will just give you a Wrong Answer.

@akash781994 , in case you didn’t know, you can edit answers. No need to post multiple answers like this. You should edit your original answer and delete this one.