結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
kou6839
|
| 提出日時 | 2014-12-12 15:54:47 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 433 bytes |
| コンパイル時間 | 2,062 ms |
| コンパイル使用メモリ | 75,744 KB |
| 実行使用メモリ | 54,324 KB |
| 最終ジャッジ日時 | 2024-06-11 21:00:49 |
| 合計ジャッジ時間 | 3,893 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 2 |
ソースコード
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int temp = (int)(Math.ceil(Math.sqrt(x*x*1.0+y*y*1.0)));
if(temp*temp==x*x+y*y){
System.out.println(temp*2+1);
}else{
System.out.println(temp*2);
}
}
}
kou6839