結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-09 22:30:41 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 1,000 ms |
| コード長 | 690 bytes |
| コンパイル時間 | 3,083 ms |
| コンパイル使用メモリ | 103,936 KB |
| 実行使用メモリ | 19,840 KB |
| 最終ジャッジ日時 | 2024-11-16 10:24:38 |
| 合計ジャッジ時間 | 3,592 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
using System.Text;
using System.Threading.Tasks;
namespace yuki_419
{
class Program
{
static void Main(string[] args)
{
var t = scan;
var c = t.Max();
var b = t.Min();
double a = Math.Sqrt(c * c - b * b);
if(c !=b) Console.WriteLine(a.ToString("0.0000000"));
else
{
a = c * Math.Sqrt(2);
Console.WriteLine(a.ToString("0.0000000"));
}
}
static int[] scan { get { return Array.ConvertAll(Console.ReadLine().Split(), int.Parse); } }
}
}