LADDU question. Could anyone help in finding where am I going wrong?

Scanner s = new Scanner(System.in);
int t = s.nextInt();

        while (t--> 0) {
            int limit = 0;
            int point = 0;

            int activities = s.nextInt();
          
            String origin = s.next();
            if(origin.equals("INDIAN")){
                limit = 200;
            } else
                limit = 400;
                
            for(int i = 0; i < activities; i++) {
                String a1 = s.next();
                 if(a1.equals("CONTEST_WON")) {
                 int rank = s.nextInt();
                if (rank < 20) {
                    point = 300 + 20 - rank;
                }
            }
            
                if(a1.equals("TOP_CONTRIBUTOR"))
                point += 300;

            
                if(a1.equals("BUG_FOUND")) {
                int sev = s.nextInt();
                point += sev;
                }
                if(a1.equals("CONTEST_HOSTED"))
                point += 50;

            
                
            }
            System.out.println(point / limit);

// s.close();

        }

check once I don’t have idea on your Language but for every CONTEST_WON you must give 300 points , but also if their rank <=20 then bonus must be given to that 300 who has won the contest i.e; 300+(20-rank) …I think this mistake you did!.and also there may be like many CONTEST_WON activities you must include those also along with bonus if applicable.
In case of consecutive CONTEST_WON then your point will be still 300 instead of 600 for second time…or else if contest won case comes in the middle of activity your all point additions will be erased and now point will be equal to CONTEST_WON case;
i.e;//initialize point to 0;
if(rank<=20)
{
point = point + 300 + 20 - rank;
}
else
{
point = point + 300;
}

@pulkit8055

Write String origin=s.nextLine().trim(); to avoid taking white space instead of INDIAN or NON_ INDIAN. Also rank<=20.

Anyone can please tell me whats the problem with my code?

import java.util.Arrays;
import java.util.Scanner;

class Codechef {

public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int t = in.nextInt();
    in.nextLine();
    for (int i = 0; i <t ; i++) {
        int ans = 0;
        String[] origin = in.nextLine().split(" ");
        for(int j=0;j<Integer.parseInt(origin[0]);j++){
        String[] key = in.nextLine().split(" ");

        if (key[0].equals("CONTEST_WON")) {
            if(Integer.parseInt(key[1])<=20){
                ans += (300 + 20 - Integer.parseInt(key[1]));
            }else{
                ans+=300;
            }


        }

        else if (key[0].equals("TOP_CONTRIBUTOR")) {
            ans += 300;

        }


        else if (key[0].equals("BUG_FOUND")) {
            if (Integer.parseInt(key[1]) > 50 && Integer.parseInt(key[1]) < 1000) {
                ans += Integer.parseInt(key[1]);
            }
        }


        else if (key[0].equals("CONTEST_HOSTED")) {
                              ans += 50;
        }
    }
        if(origin[1].equals("INDIAN")){
            System.out.println(ans/200);
        }else{
            System.out.println(ans/400);
        }
    }

}

}

In Bug Found Part 50 and 1000 are also included you can see in constraints( 50 ≤ severity≤ 1000) so according to me you are failing at this test case when BUG_FOUND 50 or 1000.

thanks a lot