結果

問題 No.99 ジャンピング駒
ユーザー bluemeganebluemegane
提出日時 2018-09-21 20:02:02
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 2,021 ms
コンパイル使用メモリ 100,068 KB
実行使用メモリ 37,120 KB
最終ジャッジ日時 2023-09-25 10:47:55
合計ジャッジ時間 3,354 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 108 ms
36,996 KB
testcase_05 AC 108 ms
32,928 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        var odd = 0; var even = 0;
        for (int i = 0; i < n; i++)
            if (n % 2 == 0) even++;
            else odd++;
        Console.WriteLine(Math.Abs(odd - even));
    }
}
0