結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2018-05-16 20:16:19 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 147 ms / 5,000 ms |
| コード長 | 337 bytes |
| コンパイル時間 | 2,112 ms |
| コンパイル使用メモリ | 74,736 KB |
| 実行使用メモリ | 41,552 KB |
| 最終ジャッジ日時 | 2024-06-28 13:20:37 |
| 合計ジャッジ時間 | 4,191 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int y = scan.nextInt();
scan.close();
double r = 2 * Math.sqrt(x * x + y * y);
if(r == 0) {
System.out.println(1);
}else {
System.out.println((int)r + 1);
}
}
}
YamaKasa