結果

問題 No.780 オフ会
ユーザー bluemeganebluemegane
提出日時 2019-01-16 11:51:49
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 2,078 ms
コンパイル使用メモリ 102,900 KB
実行使用メモリ 22,932 KB
最終ジャッジ日時 2023-09-09 23:12:57
合計ジャッジ時間 4,478 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
22,872 KB
testcase_01 AC 56 ms
22,784 KB
testcase_02 AC 56 ms
20,756 KB
testcase_03 AC 55 ms
20,680 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 55 ms
18,608 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 56 ms
20,724 KB
testcase_10 AC 56 ms
20,804 KB
testcase_11 WA -
testcase_12 AC 56 ms
20,588 KB
testcase_13 AC 55 ms
20,812 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 56 ms
20,888 KB
testcase_17 AC 57 ms
18,512 KB
testcase_18 WA -
testcase_19 AC 56 ms
22,756 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = int.Parse(line[0]);
        var b = int.Parse(line[1]);
        var w = a + b + 1 - Min(a + 1, b) * 2;
        if (w == 0) { Console.WriteLine("YES\n0"); }
        else { Console.WriteLine("NO\n{0}", w); }
    }
}

0