Submission #18871


Source Code Expand

Copy
using System;
using System.Collections.Generic;

public class Myon
{
    public static void Main()
    {
        new Myon().Solve();
    }

    public void Solve()
    {
        int N = int.Parse(Console.ReadLine());
        string score = Console.ReadLine();
        int i;
        int a = 0;
        int b = 0;
        int c = 0;
        int d = 0;
        int f = 0;

        for (i = 0; i < N; i++)
        {
            if (score[i] == 'A')
                a++;
            else if (score[i] == 'B')
                b++;
            else if (score[i] == 'C')
                c++;
            else if (score[i] == 'D')
                d++;
            else if (score[i] == 'F')
                f++;
        }

        Console.WriteLine((4 * a + 3 * b + 2 * c + 1 * d + 0 * f) / N);
    }
}

Submission Info

Submission Time
Task A - GPA計算
User meg73
Language C# (Mono 2.10.8.1)
Score 0
Code Size 830 Byte
Status WA
Exec Time 133 ms
Memory 7540 KB

Judge Result

Set Name all
Score / Max Score 0 / 100
Status
AC × 13
WA × 19
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 WA 127 ms 7472 KB
00_sample_02.txt AC 133 ms 7476 KB
01_rnd_01.txt AC 129 ms 7476 KB
01_rnd_02.txt AC 126 ms 7472 KB
01_rnd_03.txt WA 127 ms 7444 KB
01_rnd_04.txt WA 131 ms 7476 KB
01_rnd_05.txt WA 130 ms 7524 KB
01_rnd_06.txt WA 126 ms 7480 KB
01_rnd_07.txt WA 128 ms 7480 KB
01_rnd_08.txt WA 125 ms 7540 KB
01_rnd_09.txt WA 124 ms 7468 KB
01_rnd_10.txt WA 124 ms 7476 KB
02_rndmax_01.txt WA 128 ms 7480 KB
02_rndmax_02.txt WA 124 ms 7476 KB
02_rndmax_03.txt WA 127 ms 7476 KB
02_rndmax_04.txt WA 126 ms 7448 KB
02_rndmax_05.txt WA 129 ms 7532 KB
02_rndmax_06.txt WA 126 ms 7536 KB
02_rndmax_07.txt WA 126 ms 7476 KB
02_rndmax_08.txt WA 125 ms 7528 KB
02_rndmax_09.txt WA 127 ms 7476 KB
02_rndmax_10.txt WA 126 ms 7528 KB
03_mini_01.txt AC 126 ms 7536 KB
03_mini_02.txt AC 128 ms 7460 KB
03_mini_03.txt AC 128 ms 7452 KB
03_mini_04.txt AC 124 ms 7476 KB
03_mini_05.txt AC 126 ms 7536 KB
04_samemax_01.txt AC 126 ms 7472 KB
04_samemax_02.txt AC 127 ms 7540 KB
04_samemax_03.txt AC 129 ms 7476 KB
04_samemax_04.txt AC 127 ms 7464 KB
04_samemax_05.txt AC 126 ms 7524 KB