結果

問題 No.780 オフ会
ユーザー funakoshifunakoshi
提出日時 2019-07-02 09:31:38
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 684 bytes
コンパイル時間 5,054 ms
コンパイル使用メモリ 103,584 KB
実行使用メモリ 22,832 KB
最終ジャッジ日時 2023-09-26 14:44:37
合計ジャッジ時間 6,355 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
20,732 KB
testcase_01 AC 62 ms
22,736 KB
testcase_02 AC 59 ms
20,804 KB
testcase_03 AC 60 ms
20,708 KB
testcase_04 AC 60 ms
20,648 KB
testcase_05 AC 59 ms
20,796 KB
testcase_06 AC 57 ms
20,688 KB
testcase_07 AC 58 ms
20,784 KB
testcase_08 AC 59 ms
20,792 KB
testcase_09 AC 59 ms
20,696 KB
testcase_10 AC 58 ms
22,820 KB
testcase_11 AC 58 ms
20,908 KB
testcase_12 AC 59 ms
22,740 KB
testcase_13 AC 58 ms
18,760 KB
testcase_14 AC 58 ms
20,788 KB
testcase_15 AC 58 ms
20,776 KB
testcase_16 AC 62 ms
22,832 KB
testcase_17 AC 59 ms
20,720 KB
testcase_18 AC 58 ms
20,720 KB
testcase_19 AC 59 ms
20,908 KB
testcase_20 AC 58 ms
22,756 KB
testcase_21 AC 59 ms
20,800 KB
testcase_22 AC 58 ms
20,836 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[] str = Console.ReadLine().Split(' ');
            int boy = int.Parse(str[0])+1;
            int girl = int.Parse(str[1]);
            int amari = girl - boy;
            if(amari>=0)
            {
                Console.WriteLine("YES");
                Console.WriteLine(amari);
            }
            else
            {
                Console.WriteLine("NO");
                Console.WriteLine(amari * -1);
            }
        }
    }
}
0