結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-03 00:13:10 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 814 bytes |
| コンパイル時間 | 11,078 ms |
| コンパイル使用メモリ | 220,404 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 23:22:20 |
| 合計ジャッジ時間 | 11,565 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
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, y = float64(int(x*1e12)), float64(int(y*1e12))
x, 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-5 > 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
}