AtCoder Regular Contest 003

Submission #17948

Source codeソースコード

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {
	
	public static void main(String[] args) throws IOException {
		BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
		int[] map = new int[512];
		map['A'] = 4;
		map['B'] = 3;
		map['C'] = 2;
		map['D'] = 1;
		map['F'] = 0;
		s.readLine();
		String line = s.readLine();
		int sum = 0;
		for (int i = 0 ; i < line.length() ; i++) {
			sum += map[line.charAt(i)];
		}
		
		double gpa = sum * 1.0d / line.length();
		System.out.println(gpa);
	}
}

Submission

Task問題 A - GPA計算
User nameユーザ名 hama_du
Created time投稿日時
Language言語 Java (OpenJDK 1.7.0)
Status状態 AC
Score得点 100
Source lengthソースコード長 656 Byte
File nameファイル名
Exec time実行時間 126 ms
Memory usageメモリ使用量 6840 KB

Test case

Set

Set name Score得点 / Max score Cases
all 100 / 100 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_sample_01.txt AC 120 ms 6772 KB
00_sample_02.txt AC 122 ms 6772 KB
01_rnd_01.txt AC 123 ms 6768 KB
01_rnd_02.txt AC 123 ms 6840 KB
01_rnd_03.txt AC 124 ms 6740 KB
01_rnd_04.txt AC 123 ms 6744 KB
01_rnd_05.txt AC 122 ms 6764 KB
01_rnd_06.txt AC 123 ms 6708 KB
01_rnd_07.txt AC 124 ms 6740 KB
01_rnd_08.txt AC 122 ms 6772 KB
01_rnd_09.txt AC 123 ms 6644 KB
01_rnd_10.txt AC 124 ms 6764 KB
02_rndmax_01.txt AC 122 ms 6640 KB
02_rndmax_02.txt AC 121 ms 6768 KB
02_rndmax_03.txt AC 123 ms 6772 KB
02_rndmax_04.txt AC 123 ms 6740 KB
02_rndmax_05.txt AC 121 ms 6772 KB
02_rndmax_06.txt AC 126 ms 6772 KB
02_rndmax_07.txt AC 122 ms 6764 KB
02_rndmax_08.txt AC 124 ms 6764 KB
02_rndmax_09.txt AC 123 ms 6664 KB
02_rndmax_10.txt AC 122 ms 6772 KB
03_mini_01.txt AC 122 ms 6768 KB
03_mini_02.txt AC 125 ms 6744 KB
03_mini_03.txt AC 122 ms 6772 KB
03_mini_04.txt AC 122 ms 6644 KB
03_mini_05.txt AC 122 ms 6736 KB
04_samemax_01.txt AC 122 ms 6764 KB
04_samemax_02.txt AC 125 ms 6740 KB
04_samemax_03.txt AC 119 ms 6768 KB
04_samemax_04.txt AC 123 ms 6748 KB
04_samemax_05.txt AC 123 ms 6772 KB