結果

問題 No.410 出会い
ユーザー CroweaCrowea
提出日時 2019-01-24 14:16:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 804 bytes
コンパイル時間 767 ms
コンパイル使用メモリ 64,176 KB
実行使用メモリ 25,956 KB
最終ジャッジ日時 2023-10-14 09:38:25
合計ジャッジ時間 3,518 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
25,956 KB
testcase_01 AC 58 ms
23,732 KB
testcase_02 AC 59 ms
21,720 KB
testcase_03 AC 56 ms
23,756 KB
testcase_04 AC 56 ms
25,812 KB
testcase_05 AC 57 ms
24,048 KB
testcase_06 AC 60 ms
23,972 KB
testcase_07 AC 60 ms
25,956 KB
testcase_08 AC 56 ms
23,848 KB
testcase_09 AC 57 ms
25,852 KB
testcase_10 AC 54 ms
25,764 KB
testcase_11 AC 58 ms
23,872 KB
testcase_12 AC 57 ms
25,868 KB
testcase_13 AC 57 ms
25,860 KB
testcase_14 AC 56 ms
25,840 KB
testcase_15 AC 58 ms
21,728 KB
testcase_16 AC 60 ms
23,776 KB
testcase_17 AC 57 ms
23,744 KB
testcase_18 AC 58 ms
23,888 KB
testcase_19 AC 57 ms
23,856 KB
testcase_20 AC 56 ms
23,828 KB
testcase_21 AC 57 ms
23,824 KB
testcase_22 AC 59 ms
23,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Linq;

class Program
{
    class Point
    {
        public int X { get; set; }
        public int Y { get; set; }
        public Point(int x, int y)
        {
            X = x;
            Y = y;
        }
    }

    static void Main(string[] args)
    {
        int[] input;
        var points = new Point[] {  new Point(0, 0),
                                    new Point(0, 0) };

        for (int i=0; i < 2; i++)
        {
            input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            points[i] = new Point(input[0], input[1]);
        }

        var dx = (Math.Abs(points[0].X - points[1].X)) / 2.0;
        var dy = (Math.Abs(points[0].Y - points[1].Y)) / 2.0;
        var time = dx + dy;
        Console.WriteLine(time);
    }
}
0