Submission #18873


Source Code Expand

Copy
    public class Test {
            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 619 Byte
Status CE

Compile Error

Main.java:1: class Test is public, should be declared in a file named Test.java
    public class Test {
           ^
Main.java:3: cannot find symbol
symbol  : class Scanner
location: class Test
            	Scanner input = new Scanner(System.in);
            	^
Main.java:3: cannot find symbol
symbol  : class Scanner
location: class Test
            	Scanner input = new Scanner(System.in);
            	                    ^
3 errors