Submission #18117


Source Code Expand

Copy
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		s.nextLine();
		String text = s.nextLine();
		double gpa = 0;
		for (int i = 0; i < num; i++) {
			gpa += "FDCBA".indexOf(text.charAt(i));
		}
		gpa /= num;
		System.out.println(gpa);
	}
}

Submission Info

Submission Time
Task A - GPA計算
User saharan
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 359 Byte
Status AC
Exec Time 504 ms
Memory 20704 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 443 ms 20616 KB
00_sample_02.txt AC 423 ms 20480 KB
01_rnd_01.txt AC 426 ms 20524 KB
01_rnd_02.txt AC 421 ms 20624 KB
01_rnd_03.txt AC 429 ms 20528 KB
01_rnd_04.txt AC 492 ms 20556 KB
01_rnd_05.txt AC 433 ms 20656 KB
01_rnd_06.txt AC 483 ms 20652 KB
01_rnd_07.txt AC 444 ms 20652 KB
01_rnd_08.txt AC 443 ms 20616 KB
01_rnd_09.txt AC 447 ms 20656 KB
01_rnd_10.txt AC 439 ms 20624 KB
02_rndmax_01.txt AC 429 ms 20616 KB
02_rndmax_02.txt AC 425 ms 20652 KB
02_rndmax_03.txt AC 440 ms 20520 KB
02_rndmax_04.txt AC 431 ms 20616 KB
02_rndmax_05.txt AC 504 ms 20652 KB
02_rndmax_06.txt AC 438 ms 20520 KB
02_rndmax_07.txt AC 432 ms 20620 KB
02_rndmax_08.txt AC 435 ms 20704 KB
02_rndmax_09.txt AC 431 ms 20648 KB
02_rndmax_10.txt AC 438 ms 20624 KB
03_mini_01.txt AC 430 ms 20528 KB
03_mini_02.txt AC 439 ms 20616 KB
03_mini_03.txt AC 441 ms 20656 KB
03_mini_04.txt AC 436 ms 20528 KB
03_mini_05.txt AC 434 ms 20616 KB
04_samemax_01.txt AC 441 ms 20660 KB
04_samemax_02.txt AC 434 ms 20616 KB
04_samemax_03.txt AC 431 ms 20604 KB
04_samemax_04.txt AC 440 ms 20560 KB
04_samemax_05.txt AC 430 ms 20492 KB