結果
| 問題 |
No.410 出会い
|
| ユーザー |
💕💖💞
|
| 提出日時 | 2016-09-09 00:13:12 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 744 bytes |
| コンパイル時間 | 14,102 ms |
| コンパイル使用メモリ | 218,328 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 11:14:35 |
| 合計ジャッジ時間 | 14,956 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
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
pair := []float64{}
text := scanner.Text()
if text == "" { break }
for i, x2 := range strings.Split(text, " ") {
x3, e := strconv.ParseFloat(x2, 64)
_ = e
_ = i
pair = append(pair, x3)
}
holder = append(holder, pair)
if th == 2 { break }
}
x, y := math.Abs(holder[0][0] - holder[1][0]), math.Abs(holder[0][1] - holder[1][1])
//distance := math.Sqrt( math.Pow((holder[0][0] - holder[1][0]),2) + math.Pow((holder[0][1] - holder[1][1]),2) )/2
//fmt.Println(holder)
fmt.Println( (x + y)/2 )
//fmt.Println(distance)
}
💕💖💞