結果
問題 | No.98 円を描こう |
ユーザー | Grenache |
提出日時 | 2015-09-23 19:37:51 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 3,690 ms |
コンパイル使用メモリ | 71,968 KB |
実行使用メモリ | 57,992 KB |
最終ジャッジ日時 | 2023-09-26 14:37:42 |
合計ジャッジ時間 | 6,167 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 136 ms
55,636 KB |
testcase_01 | AC | 137 ms
55,836 KB |
testcase_02 | AC | 132 ms
55,892 KB |
testcase_03 | AC | 133 ms
55,868 KB |
testcase_04 | AC | 132 ms
55,496 KB |
testcase_05 | AC | 131 ms
55,468 KB |
testcase_06 | WA | - |
testcase_07 | AC | 130 ms
55,672 KB |
testcase_08 | AC | 132 ms
55,776 KB |
testcase_09 | WA | - |
ソースコード
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 r = (int)Math.ceil(Math.sqrt(x * x + y * y)); int ret = 2 * r; if (r * r == x * x + y * y) { ret++; } System.out.println(ret); sc.close(); } }