Submission #34179


Source Code Expand

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

namespace atcoder006_a
{
    class Program
    {
        static void Main(string[] args)
        {
            //変数宣言
            int intTokyu = 0; 
            
            string strTosenNo = Console.ReadLine();
            string strBonusNo = Console.ReadLine();
            string strSetNo = Console.ReadLine();

            switch (blnCheckTokyuElse(strTosenNo, strSetNo))
            {
                case 6:
                    intTokyu = 1;
                    break;
                case 5:
                    if (HasString(strSetNo, strBonusNo) == true)
                    {
                        intTokyu = 2;
                    }
                    else
                    {
                        intTokyu = 3;
                    }
                    break;
                case 4:
                    intTokyu = 4;
                    break;
                case 3:
                    intTokyu = 5;
                    break;
                default:
                    intTokyu = 0;
                    break;
            }

            Console.WriteLine(intTokyu);
        }

        //一致する個数を数える
        static int blnCheckTokyuElse(string strTosenNo, string strSetNo)
        {
            int intCount;
            int intFindCount;

            intFindCount = 0;

            for (intCount = 0; intCount < 6; intCount++)
            {
                if (HasString(strTosenNo,strSetNo.Substring(intCount, 1) ) == true)
                {
                    intFindCount++;
                }
            }
            return intFindCount;

        }

        static bool HasString(string target, string word)
        {
            if (word == "")
                return false;
            if (target.IndexOf(word) >= 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}

Submission Info

Submission Time
Task A - 宝くじ
User iemon
Language C# (Mono 2.10.8.1)
Score 0
Code Size 2098 Byte
Status WA
Exec Time 194 ms
Memory 8420 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 20
WA × 31
Set Name Test Cases
All 00_1_01.txt, 00_1_02.txt, 00_2_01.txt, 00_2_02.txt, 00_3_01.txt, 00_3_02.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 01_rand_20.txt, 01_rand_21.txt, 01_rand_22.txt, 01_rand_23.txt, 01_rand_24.txt, 01_rand_25.txt, 01_rand_26.txt, 01_rand_27.txt, 01_rand_28.txt, 01_rand_29.txt, 01_rand_30.txt, 01_rand_31.txt, 01_rand_32.txt, 01_rand_33.txt, 01_rand_34.txt, 01_rand_35.txt, 01_rand_36.txt, 01_rand_37.txt, 01_rand_38.txt, 01_rand_39.txt
Case Name Status Exec Time Memory
00_1_01.txt AC 146 ms 8280 KB
00_1_02.txt AC 147 ms 8308 KB
00_2_01.txt WA 147 ms 8320 KB
00_2_02.txt AC 150 ms 8328 KB
00_3_01.txt WA 146 ms 8260 KB
00_3_02.txt AC 147 ms 8324 KB
00_sample_01.txt AC 152 ms 8420 KB
00_sample_02.txt WA 148 ms 8332 KB
00_sample_03.txt AC 146 ms 8284 KB
00_sample_04.txt WA 147 ms 8264 KB
00_sample_05.txt WA 156 ms 8328 KB
01_rand_00.txt WA 147 ms 8320 KB
01_rand_01.txt AC 149 ms 8320 KB
01_rand_02.txt WA 145 ms 8420 KB
01_rand_03.txt AC 146 ms 8292 KB
01_rand_04.txt WA 146 ms 8248 KB
01_rand_05.txt WA 146 ms 8292 KB
01_rand_06.txt WA 147 ms 8296 KB
01_rand_07.txt AC 146 ms 8324 KB
01_rand_08.txt WA 147 ms 8320 KB
01_rand_09.txt AC 148 ms 8324 KB
01_rand_10.txt AC 146 ms 8328 KB
01_rand_11.txt WA 147 ms 8292 KB
01_rand_12.txt WA 145 ms 8284 KB
01_rand_13.txt WA 146 ms 8284 KB
01_rand_14.txt WA 146 ms 8292 KB
01_rand_15.txt WA 147 ms 8296 KB
01_rand_16.txt WA 146 ms 8324 KB
01_rand_17.txt AC 149 ms 8308 KB
01_rand_18.txt WA 189 ms 8328 KB
01_rand_19.txt WA 147 ms 8320 KB
01_rand_20.txt WA 146 ms 8320 KB
01_rand_21.txt AC 147 ms 8324 KB
01_rand_22.txt WA 146 ms 8328 KB
01_rand_23.txt AC 148 ms 8320 KB
01_rand_24.txt AC 148 ms 8304 KB
01_rand_25.txt WA 145 ms 8324 KB
01_rand_26.txt WA 146 ms 8288 KB
01_rand_27.txt AC 147 ms 8328 KB
01_rand_28.txt WA 194 ms 8328 KB
01_rand_29.txt AC 146 ms 8328 KB
01_rand_30.txt AC 147 ms 8324 KB
01_rand_31.txt WA 153 ms 8332 KB
01_rand_32.txt WA 153 ms 8328 KB
01_rand_33.txt WA 150 ms 8328 KB
01_rand_34.txt AC 153 ms 8332 KB
01_rand_35.txt WA 145 ms 8320 KB
01_rand_36.txt AC 151 ms 8280 KB
01_rand_37.txt WA 148 ms 8332 KB
01_rand_38.txt WA 187 ms 8336 KB
01_rand_39.txt WA 149 ms 8320 KB