Language: Java

import java.util.ArrayList;
import java.util.Scanner;
 
public class main {
    public static void main(String[] args) {
        int i, m, f, r, gou, flg = 0, cnt = 0;
	String seiseki;
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> mid = new ArrayList<Integer>(); //??????????¨?????????°??¨
	ArrayList<Integer> fin = new ArrayList<Integer>(); //???????????????????????°??¨
	ArrayList<Integer> rit = new ArrayList<Integer>(); //???????¨?????????°??¨
	ArrayList sei = new ArrayList(); //????????¨

	//??\?????????
	for(i = 0; flg == 0; i++){
       	    m = sc.nextInt();
       	    mid.add(new Integer(m));
       	    f = sc.nextInt();
	    fin.add(new Integer(f));
       	    r = sc.nextInt();
       	    rit.add(new Integer(r));
	    cnt++;
	    if(m == -1 && f == -1 && r == -1)
		break;
        }
	//??????????????????
        for(i = 0; cnt != i; i++){
	    if(fin.get(new Integer(i)) == -1 || mid.get(new Integer(i)) == -1)
		sei.add("F");
	    gou = fin.get(new Integer(i)) + mid.get(new Integer(i));
	    if(gou >= 80)
		sei.add("A");
	    else if(gou >= 65)
		sei.add("B");
	    else if(gou >= 50 || rit.get(new Integer(i)) >= 50)
		sei.add("C");
	    else if(gou >= 30)
		sei.add("D");
	    else
		sei.add("F");
	}
	for(i = 0; cnt - 1 != i; i++){
	    System.out.println(sei.get(new Integer(i)));
	}
    }
}

Compiler output:
Main.java:4: error: class main is public, should be declared in a file named main.java
public class main {
       ^
Main.java:17: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
       	    mid.add(new Integer(m));
       	            ^
Main.java:19: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    fin.add(new Integer(f));
	            ^
Main.java:21: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
       	    rit.add(new Integer(r));
       	            ^
Main.java:28: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    if(fin.get(new Integer(i)) == -1 || mid.get(new Integer(i)) == -1)
	               ^
Main.java:28: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    if(fin.get(new Integer(i)) == -1 || mid.get(new Integer(i)) == -1)
	                                                ^
Main.java:30: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    gou = fin.get(new Integer(i)) + mid.get(new Integer(i));
	                  ^
Main.java:30: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    gou = fin.get(new Integer(i)) + mid.get(new Integer(i));
	                                            ^
Main.java:35: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    else if(gou >= 50 || rit.get(new Integer(i)) >= 50)
	                                 ^
Main.java:43: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
	    System.out.println(sei.get(new Integer(i)));
	                               ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
9 warnings