結果

問題 No.98 円を描こう
ユーザー mori_chibimori_chibi
提出日時 2017-08-21 11:32:05
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 506 bytes
コンパイル時間 1,329 ms
コンパイル使用メモリ 109,472 KB
実行使用メモリ 26,992 KB
最終ジャッジ日時 2024-04-23 01:34:05
合計ジャッジ時間 1,436 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
25,136 KB
testcase_01 AC 24 ms
25,136 KB
testcase_02 AC 27 ms
23,092 KB
testcase_03 AC 23 ms
25,280 KB
testcase_04 AC 24 ms
25,316 KB
testcase_05 AC 24 ms
22,964 KB
testcase_06 AC 25 ms
26,992 KB
testcase_07 AC 24 ms
25,060 KB
testcase_08 AC 24 ms
25,316 KB
testcase_09 AC 24 ms
25,060 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 DrawCircle
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] param = Console.ReadLine().Split(' ');
            int Px = int.Parse(param[0]);
            int Py = int.Parse(param[1]);
            double r = Math.Sqrt( Math.Pow(Px, 2) + Math.Pow( Py , 2) );
            double d = r % 1;
            r = Math.Truncate(r);
            r = ( d < 0.5 ) ? ( r + 0.5 ) : ( r + 1 );
            Console.WriteLine( r * 2 );
        }
    }
}
0