結果
問題 | No.419 直角三角形 |
ユーザー |
|
提出日時 | 2016-09-09 22:30:49 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 2,836 ms |
コンパイル使用メモリ | 162,048 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 04:15:15 |
合計ジャッジ時間 | 3,052 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
import std.algorithm, std.array, std.container, std.range, std.bitmanip;import std.numeric, std.math, std.bigint, std.random, core.bitop;import std.string, std.regex, std.conv, std.stdio, std.typecons;void main(){auto rd = readln.split.map!(to!real);auto a = rd[0], b = rd[1];if (a < b) swap(a, b);if (a == b)writefln("%.6f", (a ^^ 2 + b ^^ 2).sqrt);elsewritefln("%.6f", (a ^^ 2 - b ^^ 2).sqrt);}