結果

問題 No.182 新規性の虜
ユーザー funakoshifunakoshi
提出日時 2019-06-26 13:26:22
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,021 bytes
コンパイル時間 4,157 ms
コンパイル使用メモリ 99,976 KB
実行使用メモリ 29,876 KB
最終ジャッジ日時 2023-09-07 02:38:31
合計ジャッジ時間 8,745 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
20,620 KB
testcase_01 AC 57 ms
20,768 KB
testcase_02 AC 59 ms
20,720 KB
testcase_03 AC 57 ms
20,720 KB
testcase_04 AC 58 ms
20,608 KB
testcase_05 AC 59 ms
20,780 KB
testcase_06 AC 58 ms
20,724 KB
testcase_07 AC 58 ms
22,820 KB
testcase_08 AC 97 ms
25,672 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 60 ms
20,780 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 105 ms
28,900 KB
testcase_25 AC 99 ms
27,512 KB
testcase_26 AC 72 ms
23,596 KB
testcase_27 AC 58 ms
22,788 KB
evil01.txt AC 114 ms
30,700 KB
evil02.txt AC 113 ms
28,612 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoderTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string findlist = Console.ReadLine();
            string[] list = findlist.Split(' ');
            int[] num = new int[list.Length];
            int Newcnt = 0;
            for (int i = 0; i < num.Length; i++) 
            {
                num[i] = int.Parse(list[i]);
            }
            Array.Sort(num);
            for (int i = 0; i < num.Length - 1; i++)
            {
                if(num[i]!=num[i+1])
                {
                    Newcnt++;
                }
                else
                {
                    i++;
                }
                if(num.Length-Newcnt==1)
                {
                    Newcnt++;
                }
            }

            Console.WriteLine(Newcnt);
        }

    }
}
0