結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-09 23:39:41 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 101 ms / 5,000 ms |
| コード長 | 441 bytes |
| 記録 | |
| コンパイル時間 | 3,521 ms |
| コンパイル使用メモリ | 82,244 KB |
| 実行使用メモリ | 47,656 KB |
| 最終ジャッジ日時 | 2026-03-05 00:58:57 |
| 合計ジャッジ時間 | 5,059 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
import java.util.Scanner;
public class Main98 {
public static void main(String[] args) {
Main98 p = new Main98();
}
public Main98() {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
solve(x, y);
}
public void solve(int x, int y) {
x*=2; y*=2;
double r = Math.ceil(Math.sqrt(x*x+y*y));
if(x*x+y*y == (int)(r*r))
r++;
System.out.println((int)r);
}
}