結果

問題 No.780 オフ会
ユーザー Crowea
提出日時 2019-01-19 01:12:45
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 612 bytes
コンパイル時間 683 ms
コンパイル使用メモリ 111,160 KB
実行使用メモリ 26,268 KB
最終ジャッジ日時 2024-07-07 06:09:36
合計ジャッジ時間 1,793 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
class Program
{
    static void Main(string[] args)
    {
        // 人数を読み込み
        var input = Console.ReadLine().Split(' ');
        int males = int.Parse(input[0]);
        int females = int.Parse(input[1]);
        // ペアになれなかった人数
        int notPair = 0;

        notPair = Math.Abs((males - females)+1);
        if (notPair == 0)
        {
            Console.WriteLine("YES");
            Console.WriteLine(notPair);
        }
        else
        {
            Console.WriteLine("NO");
            Console.WriteLine(notPair);
        }
        
    }
}

0