結果

問題 No.410 出会い
ユーザー funakoshifunakoshi
提出日時 2019-06-28 10:53:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 972 bytes
コンパイル時間 2,907 ms
コンパイル使用メモリ 101,272 KB
実行使用メモリ 24,784 KB
最終ジャッジ日時 2023-09-14 21:13:09
合計ジャッジ時間 5,025 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
22,740 KB
testcase_01 AC 63 ms
24,728 KB
testcase_02 AC 63 ms
22,656 KB
testcase_03 AC 63 ms
24,768 KB
testcase_04 AC 66 ms
24,776 KB
testcase_05 AC 66 ms
22,764 KB
testcase_06 AC 64 ms
22,668 KB
testcase_07 AC 63 ms
22,632 KB
testcase_08 AC 63 ms
22,628 KB
testcase_09 AC 63 ms
22,744 KB
testcase_10 AC 63 ms
22,688 KB
testcase_11 AC 63 ms
22,756 KB
testcase_12 AC 63 ms
22,744 KB
testcase_13 AC 63 ms
22,736 KB
testcase_14 AC 63 ms
22,640 KB
testcase_15 AC 63 ms
22,760 KB
testcase_16 AC 63 ms
24,784 KB
testcase_17 AC 63 ms
24,720 KB
testcase_18 AC 64 ms
24,680 KB
testcase_19 AC 63 ms
24,668 KB
testcase_20 AC 65 ms
22,800 KB
testcase_21 AC 68 ms
24,724 KB
testcase_22 AC 64 ms
24,728 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[] input1 = Console.ReadLine().Split(' ');
            string[] input2 = Console.ReadLine().Split(' ');
            int ax = int.Parse(input1[0]);
            int ay = int.Parse(input1[1]);
            int bx = int.Parse(input2[0]);
            int by = int.Parse(input2[1]);
            double x = 0;
            double y = 0;
            if (ax > bx)
            {
                x = ax - bx;
            }
            else
            {
                x = bx - ax;
            }
            if (ay > by)
            {
                y = ay - by;
            }
            else
            {
                y = by - ay;
            }
            double ans = (x + y) / 2;
            Console.WriteLine(ans);
            }

    }
}
0