Submission #19218


Source Code Expand

Copy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sandbox
{
    class Program
    {
        static void Main(string[] args)
        {
            string strTmp = args[0].Replace("\r\n", "\n");
            string[] str = strTmp.Split('\n');
            int numOfUnits = int.Parse(str[0]);
            int numOfA = CountChar(str[1], 'A');
            int numOfB = CountChar(str[1], 'B');
            int numOfC = CountChar(str[1], 'C');
            int numOfD = CountChar(str[1], 'D');
            int numOfF = CountChar(str[1], 'F');

            double gpa = (numOfA * 4.0f + numOfB * 3.0f + numOfC * 2.0f + numOfD * 1.0f) / numOfUnits;
            Console.WriteLine(gpa.ToString());
            Console.WriteLine();
        }

        public static int CountChar(string s, char c)
        {
            return s.Length - s.Replace(c.ToString(), "").Length;
        }
    }

}

Submission Info

Submission Time
Task A - GPA計算
User jack1568
Language C# (Mono 2.10.8.1)
Score 0
Code Size 956 Byte
Status RE
Exec Time 172 ms
Memory 7148 KB

Judge Result

Set Name all
Score / Max Score 0 / 100
Status
RE × 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 RE 133 ms 7104 KB
00_sample_02.txt RE 128 ms 7144 KB
01_rnd_01.txt RE 129 ms 7104 KB
01_rnd_02.txt RE 128 ms 7140 KB
01_rnd_03.txt RE 130 ms 7144 KB
01_rnd_04.txt RE 127 ms 7132 KB
01_rnd_05.txt RE 129 ms 7144 KB
01_rnd_06.txt RE 130 ms 7052 KB
01_rnd_07.txt RE 137 ms 7144 KB
01_rnd_08.txt RE 132 ms 7092 KB
01_rnd_09.txt RE 172 ms 7148 KB
01_rnd_10.txt RE 134 ms 7100 KB
02_rndmax_01.txt RE 128 ms 7148 KB
02_rndmax_02.txt RE 129 ms 7148 KB
02_rndmax_03.txt RE 132 ms 7084 KB
02_rndmax_04.txt RE 127 ms 7104 KB
02_rndmax_05.txt RE 133 ms 7108 KB
02_rndmax_06.txt RE 133 ms 7140 KB
02_rndmax_07.txt RE 126 ms 7140 KB
02_rndmax_08.txt RE 128 ms 7104 KB
02_rndmax_09.txt RE 129 ms 7144 KB
02_rndmax_10.txt RE 127 ms 7148 KB
03_mini_01.txt RE 129 ms 7144 KB
03_mini_02.txt RE 129 ms 7136 KB
03_mini_03.txt RE 119 ms 7132 KB
03_mini_04.txt RE 137 ms 7140 KB
03_mini_05.txt RE 129 ms 7052 KB
04_samemax_01.txt RE 133 ms 7104 KB
04_samemax_02.txt RE 136 ms 7148 KB
04_samemax_03.txt RE 121 ms 7144 KB
04_samemax_04.txt RE 131 ms 7136 KB
04_samemax_05.txt RE 136 ms 7080 KB