Submission #18384


Source Code Expand

Copy
import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);

		int[] po = new int[]{ 4, 3, 2, 1, 0 };
		int p = 0;

		int N = scanner.nextInt();
		String line = scanner.nextLine();
		line = scanner.nextLine();
		
		line = line.replace("F", "E");

		for(char c : line.toCharArray())
		{
			p += 4 - (c - 'A');
		}
		System.out.println((double)((double)p/(double)N));
	}
}

Submission Info

Submission Time
Task A - GPA計算
User nankotsu230
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 463 Byte
Status AC
Exec Time 485 ms
Memory 20708 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 433 ms 20604 KB
00_sample_02.txt AC 439 ms 20604 KB
01_rnd_01.txt AC 460 ms 20556 KB
01_rnd_02.txt AC 445 ms 20532 KB
01_rnd_03.txt AC 435 ms 20600 KB
01_rnd_04.txt AC 439 ms 20600 KB
01_rnd_05.txt AC 438 ms 20596 KB
01_rnd_06.txt AC 434 ms 20696 KB
01_rnd_07.txt AC 441 ms 20640 KB
01_rnd_08.txt AC 446 ms 20656 KB
01_rnd_09.txt AC 483 ms 20592 KB
01_rnd_10.txt AC 443 ms 20596 KB
02_rndmax_01.txt AC 445 ms 20576 KB
02_rndmax_02.txt AC 440 ms 20708 KB
02_rndmax_03.txt AC 441 ms 20596 KB
02_rndmax_04.txt AC 443 ms 20540 KB
02_rndmax_05.txt AC 439 ms 20656 KB
02_rndmax_06.txt AC 438 ms 20528 KB
02_rndmax_07.txt AC 436 ms 20592 KB
02_rndmax_08.txt AC 459 ms 20588 KB
02_rndmax_09.txt AC 442 ms 20600 KB
02_rndmax_10.txt AC 435 ms 20608 KB
03_mini_01.txt AC 441 ms 20576 KB
03_mini_02.txt AC 442 ms 20452 KB
03_mini_03.txt AC 434 ms 20584 KB
03_mini_04.txt AC 431 ms 20524 KB
03_mini_05.txt AC 430 ms 20592 KB
04_samemax_01.txt AC 439 ms 20572 KB
04_samemax_02.txt AC 435 ms 20580 KB
04_samemax_03.txt AC 444 ms 20572 KB
04_samemax_04.txt AC 485 ms 20584 KB
04_samemax_05.txt AC 438 ms 20596 KB