Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
  
public class Main {
  private static String marks = "SHCD";
  
  public static void main(String[] args) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true) {
      String scores = br.readLine();
      if (scores.equals("-1 -1 -1")) {
        return;
      }

      grade(scores);
    }
  }

  private static void grade(String scores) {
    int middle = Integer.parseInt(scores.split()[0]);
    int last = Integer.parseInt(scores.split()[1]);
    int retry = Integer.parseInt(scores.split()[2]);

    //??????????¨??????????????¨????????????????????¬????????????´???????????? F???
    if (middle == -1 || last == -1) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 80 ??\???????????°????????? A ???
    } else if (middle + last >= 80) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 65 ??\??? 80 ??????????????°????????? B???
    } else if (middle + last >= 65) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 50 ??\??? 65 ??????????????°????????? C???
    } else if (middle + last >= 50) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 30 ??\??? 50 ??????????????°????????? D??? ???????????????????¨?????????°??? 50 ??\???????????°????????? C???
    } else if (middle + last >= 30) {
      if (retry >= 50) {
        System.out.println("C");
      } else {
        System.out.println("F");
      }
    //??????????¨???¨??????????¨????????¨??????°??? 30 ??????????????°????????? F???
    } else if (middle + last < 30) {
      System.out.println("F");
    }
  }
}

Compiler output:
Main.java:22: error: no suitable method found for split(no arguments)
    int middle = Integer.parseInt(scores.split()[0]);
                                        ^
    method String.split(String,int) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(char,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String) is not applicable
      (actual and formal argument lists differ in length)
Main.java:23: error: no suitable method found for split(no arguments)
    int last = Integer.parseInt(scores.split()[1]);
                                      ^
    method String.split(String,int) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(char,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String) is not applicable
      (actual and formal argument lists differ in length)
Main.java:24: error: no suitable method found for split(no arguments)
    int retry = Integer.parseInt(scores.split()[2]);
                                       ^
    method String.split(String,int) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(char,int,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method String.split(String) is not applicable
      (actual and formal argument lists differ in length)
3 errors