結果
| 問題 | 
                            No.98 円を描こう
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2014-12-09 23:37:55 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 377 bytes | 
| コンパイル時間 | 3,421 ms | 
| コンパイル使用メモリ | 74,708 KB | 
| 実行使用メモリ | 54,660 KB | 
| 最終ジャッジ日時 | 2024-06-11 19:03:24 | 
| 合計ジャッジ時間 | 4,913 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 4 WA * 2 | 
ソースコード
import java.util.Scanner;
public class Yukicoder98 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x = sc.nextDouble(), y = sc.nextDouble();
		if (Math.hypot(x, y) % 1 == 0)
			System.out.println(1 + 2 * (int) Math.ceil(Math.hypot(x, y)));
		else
			System.out.println(2 * (int) Math.ceil(Math.hypot(x, y)));
	}
}