結果
問題 |
No.98 円を描こう
|
ユーザー |
|
提出日時 | 2015-09-23 19:37:51 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 3,282 ms |
コンパイル使用メモリ | 74,688 KB |
実行使用メモリ | 41,360 KB |
最終ジャッジ日時 | 2024-07-19 08:49:12 |
合計ジャッジ時間 | 5,307 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 2 |
ソースコード
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(); } }