結果
| 問題 |
No.1178 Can you draw a Circle?
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2020-08-21 21:51:15 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 132 ms / 2,000 ms |
| コード長 | 495 bytes |
| コンパイル時間 | 2,067 ms |
| コンパイル使用メモリ | 74,232 KB |
| 実行使用メモリ | 41,580 KB |
| 最終ジャッジ日時 | 2024-11-07 13:49:24 |
| 合計ジャッジ時間 | 5,034 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
double c = sc.nextInt();
double d = sc.nextInt();
double e = sc.nextInt();
double f = sc.nextInt();
sc.close();
if (a != b) {
throw new Exception();
}
c /= a;
d /= a;
f = (f - e) / a;
c = c * c / 4;
d = d * d / 4;
f = f + c + d;
System.out.println(Math.sqrt(f));
}
}
ks2m