結果

問題 No.780 オフ会
ユーザー bluemeganebluemegane
提出日時 2019-01-16 12:25:57
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 1,958 ms
コンパイル使用メモリ 101,376 KB
実行使用メモリ 22,872 KB
最終ジャッジ日時 2023-09-09 23:51:03
合計ジャッジ時間 4,383 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
22,872 KB
testcase_01 AC 59 ms
20,776 KB
testcase_02 AC 60 ms
22,660 KB
testcase_03 AC 59 ms
22,572 KB
testcase_04 AC 58 ms
20,844 KB
testcase_05 AC 58 ms
18,708 KB
testcase_06 AC 60 ms
22,644 KB
testcase_07 AC 60 ms
20,704 KB
testcase_08 AC 60 ms
22,636 KB
testcase_09 AC 59 ms
18,588 KB
testcase_10 AC 60 ms
20,812 KB
testcase_11 AC 60 ms
20,540 KB
testcase_12 AC 59 ms
20,668 KB
testcase_13 AC 59 ms
22,576 KB
testcase_14 AC 59 ms
20,752 KB
testcase_15 AC 59 ms
18,616 KB
testcase_16 AC 59 ms
22,652 KB
testcase_17 AC 59 ms
20,760 KB
testcase_18 AC 61 ms
20,668 KB
testcase_19 AC 59 ms
20,768 KB
testcase_20 AC 59 ms
20,720 KB
testcase_21 AC 59 ms
20,704 KB
testcase_22 AC 59 ms
20,756 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 (a < b) { Console.WriteLine("YES\n{0}",w); }
        else { Console.WriteLine("NO\n{0}", w); }
    }
}

0