結果

問題 No.383 レーティング
ユーザー fujitafujita
提出日時 2023-05-10 09:24:03
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 608 bytes
コンパイル時間 11,332 ms
コンパイル使用メモリ 144,288 KB
実行使用メモリ 164,196 KB
最終ジャッジ日時 2023-08-17 16:39:26
合計ジャッジ時間 12,855 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
30,040 KB
testcase_01 AC 48 ms
29,940 KB
testcase_02 AC 48 ms
27,880 KB
testcase_03 AC 47 ms
28,056 KB
testcase_04 AC 48 ms
28,128 KB
testcase_05 AC 49 ms
28,108 KB
testcase_06 AC 48 ms
28,020 KB
testcase_07 AC 48 ms
29,896 KB
testcase_08 AC 48 ms
29,884 KB
testcase_09 AC 49 ms
28,056 KB
testcase_10 AC 48 ms
27,888 KB
testcase_11 AC 48 ms
28,064 KB
testcase_12 AC 48 ms
28,116 KB
testcase_13 AC 48 ms
164,196 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 184 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {

        static void Main(string[] args)
        {
            
            var str = Console.ReadLine().Split(" ");
            var a = int.Parse(str[0]);
            var b = int.Parse(str[1]);
            int ans = 0;

            ans = b - a;

            if (ans > 0)
            {
                Console.WriteLine("+" +  ans);
            }
            else if (ans < 0)
            {
                Console.WriteLine(ans);
            }
            else
            {
                Console.WriteLine("0");
            }
        }
    }
}
0