Submission #18952


Source Code Expand

Copy
import java.util.Scanner;

    public class Main {
            public static void main(String args[]){
            	Scanner input = new Scanner(System.in);
                   	int num = input.nextInt();
                   	String s = input.next();
                    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 100
Code Size 646 Byte
Status AC
Exec Time 457 ms
Memory 20508 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 32
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 02_rndmax_01.txt, 02_rndmax_02.txt, 02_rndmax_03.txt, 02_rndmax_04.txt, 02_rndmax_05.txt, 02_rndmax_06.txt, 02_rndmax_07.txt, 02_rndmax_08.txt, 02_rndmax_09.txt, 02_rndmax_10.txt, 03_mini_01.txt, 03_mini_02.txt, 03_mini_03.txt, 03_mini_04.txt, 03_mini_05.txt, 04_samemax_01.txt, 04_samemax_02.txt, 04_samemax_03.txt, 04_samemax_04.txt, 04_samemax_05.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 414 ms 20508 KB
00_sample_02.txt AC 406 ms 20380 KB
01_rnd_01.txt AC 398 ms 20244 KB
01_rnd_02.txt AC 404 ms 20360 KB
01_rnd_03.txt AC 413 ms 20376 KB
01_rnd_04.txt AC 411 ms 20348 KB
01_rnd_05.txt AC 409 ms 20368 KB
01_rnd_06.txt AC 406 ms 20368 KB
01_rnd_07.txt AC 407 ms 20356 KB
01_rnd_08.txt AC 416 ms 20352 KB
01_rnd_09.txt AC 421 ms 20368 KB
01_rnd_10.txt AC 411 ms 20368 KB
02_rndmax_01.txt AC 401 ms 20364 KB
02_rndmax_02.txt AC 431 ms 20272 KB
02_rndmax_03.txt AC 399 ms 20352 KB
02_rndmax_04.txt AC 404 ms 20352 KB
02_rndmax_05.txt AC 407 ms 20356 KB
02_rndmax_06.txt AC 419 ms 20312 KB
02_rndmax_07.txt AC 420 ms 20336 KB
02_rndmax_08.txt AC 420 ms 20488 KB
02_rndmax_09.txt AC 419 ms 20368 KB
02_rndmax_10.txt AC 418 ms 20376 KB
03_mini_01.txt AC 426 ms 20360 KB
03_mini_02.txt AC 422 ms 20360 KB
03_mini_03.txt AC 422 ms 20384 KB
03_mini_04.txt AC 431 ms 20340 KB
03_mini_05.txt AC 443 ms 20372 KB
04_samemax_01.txt AC 457 ms 20280 KB
04_samemax_02.txt AC 441 ms 20248 KB
04_samemax_03.txt AC 424 ms 20364 KB
04_samemax_04.txt AC 412 ms 20312 KB
04_samemax_05.txt AC 427 ms 20244 KB