結果

問題 No.98 円を描こう
ユーザー ktshunktshun
提出日時 2015-05-29 22:11:43
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 5,000 ms
コード長 232 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 6,188 KB
最終ジャッジ日時 2023-09-20 16:05:54
合計ジャッジ時間 795 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,048 KB
testcase_01 AC 12 ms
6,008 KB
testcase_02 AC 12 ms
5,904 KB
testcase_03 AC 11 ms
5,972 KB
testcase_04 AC 11 ms
6,132 KB
testcase_05 AC 12 ms
6,128 KB
testcase_06 AC 11 ms
5,988 KB
testcase_07 AC 11 ms
6,048 KB
testcase_08 AC 12 ms
6,152 KB
testcase_09 AC 11 ms
6,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-
import math

if __name__ == "__main__":
	x,y = map(int,raw_input().split())
	dist = math.sqrt(x ** 2 + y ** 2)
	dist2 = round(dist,0)
	if dist2 <= dist:
		print int(dist2 * 2 +1)
	else:
		print int(dist2 * 2)
0