結果

問題 No.172 UFOを捕まえろ
ユーザー ooh_20ooh_20
提出日時 2018-01-22 12:15:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 426 bytes
コンパイル時間 2,072 ms
コンパイル使用メモリ 103,760 KB
実行使用メモリ 22,928 KB
最終ジャッジ日時 2023-08-26 20:21:11
合計ジャッジ時間 4,229 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
20,948 KB
testcase_01 AC 51 ms
22,824 KB
testcase_02 AC 50 ms
20,888 KB
testcase_03 AC 50 ms
20,784 KB
testcase_04 AC 51 ms
20,820 KB
testcase_05 AC 49 ms
22,784 KB
testcase_06 AC 50 ms
22,860 KB
testcase_07 AC 50 ms
20,780 KB
testcase_08 AC 50 ms
20,764 KB
testcase_09 AC 52 ms
22,856 KB
testcase_10 AC 51 ms
20,720 KB
testcase_11 AC 52 ms
20,756 KB
testcase_12 AC 53 ms
20,856 KB
testcase_13 AC 51 ms
18,816 KB
testcase_14 AC 53 ms
20,772 KB
testcase_15 AC 51 ms
20,948 KB
testcase_16 AC 50 ms
20,820 KB
testcase_17 AC 50 ms
20,892 KB
testcase_18 AC 51 ms
20,836 KB
testcase_19 AC 50 ms
18,700 KB
testcase_20 AC 50 ms
20,692 KB
testcase_21 AC 49 ms
20,824 KB
testcase_22 AC 51 ms
22,928 KB
testcase_23 AC 50 ms
18,724 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace ConsoleApp29
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] row = Console.ReadLine().Split();

            int x = int.Parse(row[0]);
            int y = int.Parse(row[1]);
            int r = int.Parse(row[2]);

            int M = (int)Math.Ceiling(Math.Abs(x) + Math.Abs(y) + r * Math.Sqrt(2));

            Console.WriteLine(M);
        }
    }
}
0