結果

問題 No.105 arcの六角ボルト
ユーザー yukirinyukirin
提出日時 2016-03-02 23:43:59
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 827 bytes
コンパイル時間 11,285 ms
コンパイル使用メモリ 233,772 KB
実行使用メモリ 6,812 KB
最終ジャッジ日時 2024-04-19 06:38:16
合計ジャッジ時間 11,820 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)
var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func main() {
	sc.Split(bufio.ScanWords)
	t := nextInt()

	for i := 0; i < t; i++ {
		for j := 0; j < 6; j++ {
			x, y := nextFloat(), nextFloat()
			x *= 1e12
			y *= 1e12
			x, y = math.Floor(x), math.Floor(y)
			x /= 1e12
			y /= 1e12

			angleX := math.Acos(x) * 180 / math.Pi
			angleY := math.Asin(y) * 180 / math.Pi
			if angleX-angleY < 1 && angleX < 50 {
				if 1e-6 < angleX {
					fmt.Println(0)
					continue
				}
				fmt.Println(angleX)
			}
		}
	}
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	i, _ := strconv.Atoi(nextLine())
	return i
}

func nextFloat() float64 {
	f, _ := strconv.ParseFloat(nextLine(), 64)
	return f
}
0