結果
| 問題 |
No.419 直角三角形
|
| ユーザー |
ixTL255
|
| 提出日時 | 2019-09-10 00:18:46 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 1,000 ms |
| コード長 | 366 bytes |
| コンパイル時間 | 3,450 ms |
| コンパイル使用メモリ | 113,120 KB |
| 実行使用メモリ | 19,968 KB |
| 最終ジャッジ日時 | 2024-07-02 16:09:25 |
| 合計ジャッジ時間 | 4,974 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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])));
}
}
ixTL255