Submission #19318


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", "/");
            strTmp = strTmp.Replace("\n", "/");
            strTmp = strTmp.Replace("//", "/");
            string[] str = strTmp.Split('/');
            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 1048 Byte
Status RE
Exec Time 96 ms
Memory 4932 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 93 ms 4848 KB
00_sample_02.txt RE 90 ms 4844 KB
01_rnd_01.txt RE 90 ms 4844 KB
01_rnd_02.txt RE 87 ms 4848 KB
01_rnd_03.txt RE 89 ms 4932 KB
01_rnd_04.txt RE 88 ms 4852 KB
01_rnd_05.txt RE 92 ms 4792 KB
01_rnd_06.txt RE 92 ms 4836 KB
01_rnd_07.txt RE 91 ms 4852 KB
01_rnd_08.txt RE 88 ms 4848 KB
01_rnd_09.txt RE 89 ms 4804 KB
01_rnd_10.txt RE 89 ms 4844 KB
02_rndmax_01.txt RE 89 ms 4844 KB
02_rndmax_02.txt RE 90 ms 4848 KB
02_rndmax_03.txt RE 87 ms 4844 KB
02_rndmax_04.txt RE 88 ms 4848 KB
02_rndmax_05.txt RE 90 ms 4848 KB
02_rndmax_06.txt RE 88 ms 4924 KB
02_rndmax_07.txt RE 88 ms 4852 KB
02_rndmax_08.txt RE 90 ms 4792 KB
02_rndmax_09.txt RE 90 ms 4916 KB
02_rndmax_10.txt RE 89 ms 4828 KB
03_mini_01.txt RE 89 ms 4840 KB
03_mini_02.txt RE 90 ms 4844 KB
03_mini_03.txt RE 88 ms 4856 KB
03_mini_04.txt RE 90 ms 4848 KB
03_mini_05.txt RE 92 ms 4796 KB
04_samemax_01.txt RE 96 ms 4848 KB
04_samemax_02.txt RE 89 ms 4848 KB
04_samemax_03.txt RE 88 ms 4812 KB
04_samemax_04.txt RE 88 ms 4932 KB
04_samemax_05.txt RE 87 ms 4848 KB