結果
| 問題 | 
                            No.105 arcの六角ボルト
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2014-12-20 19:21:53 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 648 bytes | 
| コンパイル時間 | 3,769 ms | 
| コンパイル使用メモリ | 74,516 KB | 
| 実行使用メモリ | 51,696 KB | 
| 最終ジャッジ日時 | 2024-06-12 02:32:06 | 
| 合計ジャッジ時間 | 5,969 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 1 | 
ソースコード
import java.util.Scanner;
public class Yukicoder105 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x, y, bx, by, tMax, tMin, theta = 0;
		int t = sc.nextInt();
		for (int i = 0; i < t; i++) {
			x = y = -1e-11;
			for (int j = 0; j < 6; j++) {
				bx = sc.nextDouble();
				by = sc.nextDouble();
				if (bx > x && by >= -1e11) {
					x = bx;
					y = by;
				}
			}
			tMax = 50;
			tMin = 0;
			for (int j = 0; j < 100; j++) {
				theta = (tMax + tMin) / 2.0;
				bx = Math.cos(Math.toRadians(theta));
				if (bx < x) tMax = theta;
				else tMin = theta;
			}
			System.out.println(theta);
		}
	}
}