結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-23 19:42:45 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 117 ms / 5,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 3,113 ms |
| コンパイル使用メモリ | 74,816 KB |
| 実行使用メモリ | 41,584 KB |
| 最終ジャッジ日時 | 2024-07-19 08:49:17 |
| 合計ジャッジ時間 | 5,026 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder98 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int l = (int)Math.ceil(Math.sqrt(x * x + y * y) * 2);
if (l % 2 == 0 && l * l / 2 / 2 == x * x + y * y) {
l++;
}
System.out.println(l);
sc.close();
}
}