結果

問題 No.419 直角三角形
ユーザー ixTL255ixTL255
提出日時 2019-09-10 00:18:46
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 68 ms / 1,000 ms
コード長 366 bytes
コンパイル時間 5,383 ms
コンパイル使用メモリ 102,864 KB
実行使用メモリ 25,908 KB
最終ジャッジ日時 2023-09-15 12:56:56
合計ジャッジ時間 8,394 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
23,788 KB
testcase_01 AC 66 ms
23,868 KB
testcase_02 AC 66 ms
23,812 KB
testcase_03 AC 65 ms
21,868 KB
testcase_04 AC 66 ms
23,800 KB
testcase_05 AC 67 ms
23,852 KB
testcase_06 AC 68 ms
23,844 KB
testcase_07 AC 67 ms
23,860 KB
testcase_08 AC 66 ms
21,924 KB
testcase_09 AC 67 ms
23,916 KB
testcase_10 AC 68 ms
23,904 KB
testcase_11 AC 67 ms
23,852 KB
testcase_12 AC 67 ms
25,836 KB
testcase_13 AC 67 ms
21,868 KB
testcase_14 AC 66 ms
21,688 KB
testcase_15 AC 68 ms
25,712 KB
testcase_16 AC 66 ms
23,856 KB
testcase_17 AC 66 ms
23,992 KB
testcase_18 AC 67 ms
25,908 KB
testcase_19 AC 67 ms
23,780 KB
testcase_20 AC 67 ms
23,640 KB
testcase_21 AC 66 ms
23,924 KB
testcase_22 AC 68 ms
23,832 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;

public class Yuki419
{
	public static void Main()
	{
		var ab = Console.ReadLine().Split().Select(x => double.Parse(x)).ToArray();
		
		if(ab[0] == ab[1]) Console.WriteLine(Math.Sqrt(ab[0] * ab[0] + ab[1] * ab[1]));
		else Console.WriteLine(Math.Sqrt(Math.Abs(ab[0] * ab[0] - ab[1] * ab[1])));
	}
}
0