Submission #18879


Source Code Expand

Copy
    public class Main {
    public static void main(String args[]){
    Scanner input = new Scanner(System.in);
    int num = input.nextInt();
    String s = input.nextLine();
    System.out.println(maximum(num,s));
    }
    public static double maximum(int num,String s){
    double sum = 0.0;
    for(int i = 0 ; i < s.length(); i++){
    if(s.charAt(i) != 'F'){
    sum += 69-(int)s.charAt(i);
    }
    }
    return sum/(double)num;
    }
     
    }

Submission Info

Submission Time
Task A - GPA計算
User spinical
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 472 Byte
Status CE

Compile Error

Main.java:3: cannot find symbol
symbol  : class Scanner
location: class Main
    Scanner input = new Scanner(System.in);
    ^
Main.java:3: cannot find symbol
symbol  : class Scanner
location: class Main
    Scanner input = new Scanner(System.in);
                        ^
2 errors