結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
fukusei
|
| 提出日時 | 2017-05-17 17:19:32 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 2,168 ms |
| コンパイル使用メモリ | 83,660 KB |
| 実行使用メモリ | 45,500 KB |
| 最終ジャッジ日時 | 2026-08-29 20:16:01 |
| 合計ジャッジ時間 | 3,700 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 5 WA * 1 |
ソースコード
import java.util.*;
public class test {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
float lng = (float)Math.sqrt(x*x + y*y);
if(lng > (int)lng){
int c = (int)Math.ceil(lng) * 2;
System.out.println(c);
}
else{
int c = (int)lng*2 + 1;
System.out.println(c);
}
}
}
fukusei