結果

問題 No.105 arcの六角ボルト
ユーザー holegumaholeguma
提出日時 2015-08-19 23:07:03
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 881 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 74,648 KB
実行使用メモリ 63,424 KB
最終ジャッジ日時 2023-09-25 13:34:06
合計ジャッジ時間 3,869 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.io.*;
import java.util.StringTokenizer;
    
class Main{
        
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE;

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
String line="";
double x=0.0;
double y=0.0;
double rx=0.0;
double ry=0.0;
int num=Integer.parseInt(br.readLine());
while(num-->0){
while((line=br.readLine())!=null){
if(line.isEmpty()) continue;
st=new StringTokenizer(line);
rx=Double.parseDouble(st.nextToken());
ry=Double.parseDouble(st.nextToken());
for(int i=1;i<6;i++){
st=new StringTokenizer(br.readLine());
x=Double.parseDouble(st.nextToken());
y=Double.parseDouble(st.nextToken());
if(x>=0&&y>=0&&x>rx){
rx=x; ry=y;
}
}
}
out.printf("%.10f\r\n",Math.toDegrees(Math.acos(rx)));
}
out.flush();
}
}
0