結果
| 問題 | No.419 直角三角形 |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2016-09-09 23:46:38 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 483 bytes |
| 記録 | |
| コンパイル時間 | 17,800 ms |
| コンパイル使用メモリ | 230,264 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-16 18:45:25 |
| 合計ジャッジ時間 | 15,289 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 3 |
ソースコード
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"math"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
holder := []float64{}
th := 0
for scanner.Scan() {
th += 1
text := scanner.Text()
for _, x2 := range strings.Split(text, " ") {
x3, e := strconv.ParseFloat(x2, 64)
_ = e
holder = append(holder, x3)
}
if th == 1 { break }
}
a, b := holder[0], holder[1]
fmt.Println( math.Pow(math.Abs(math.Pow(a, 2) - math.Pow(b, 2)), 0.5) )
}
💕💖💞