Click Here to go back to the homepage.

Death Knight Hero Solution:


import java.util.*;

public class Kattis {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int battles = Integer.parseInt(sc.nextLine());
        int wins = 0;
        for(int i = 0; i < battles; i++){
            String line = sc.nextLine();
            if(line.contains("CD"))
                continue;
            wins++;
        }
        System.out.println(wins);
    }
}