結果

問題 No.98 円を描こう
ユーザー 綾地寧々綾地寧々
提出日時 2015-08-02 10:24:46
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 980 ms
コンパイル使用メモリ 18,528 KB
実行使用メモリ 19,152 KB
最終ジャッジ日時 2023-09-25 00:31:10
合計ジャッジ時間 1,775 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,800 KB
testcase_01 AC 16 ms
18,964 KB
testcase_02 AC 16 ms
18,940 KB
testcase_03 AC 17 ms
18,704 KB
testcase_04 WA -
testcase_05 AC 16 ms
19,004 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($x, $y) = explode(" ",trim(fgets(STDIN)));
$r = pow(abs($x),2) + pow(abs($y),2);
if ( $r == 0 ) {
	$r2 = 1;
}
else {
	$r2 = sqrt($r);
	if ( pow($r2,2)-$r != 0 ) {
		$r2 = intval(ceil($r2)*2);
	}
	else {
		$r2 = intval(ceil($r2)*2) + 1;
	}
}
echo $r2 .PHP_EOL;
0