it is the problem called laddu: CodeChef: Practical coding for everyone
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int limits = 0;
int points = 0;
int activities = sc.nextInt();
String o = sc.nextLine();
if (o.equals("INDIAN")){
limits = 200;
}
else
limits = 400;
for(int i=0;i<activities;i++)
{
String s1 = sc.nextLine();
if (s1.equals("CONTEST_WON"))
{
int rank = sc.nextInt();
if(rank <= 20)
points += 300 +(20 - rank);
else
points += 300;
}
if(s1.equals("TOP_CONTRIBUTOR"))
points += 300;
if(s1.equals("BUG_FOUND"))
{
int severity = sc.nextInt();
points += severity;
}
if(s1.equals("CONTEST_HOSTED"))
{
points += 50;
}
}
System.out.println(points / limits);
}
sc.close();
}
}