結果

問題 No.98 円を描こう
ユーザー yuuki1036yuuki1036
提出日時 2018-11-11 13:58:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 150 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,496 KB
実行使用メモリ 8,052 KB
最終ジャッジ日時 2023-08-19 22:22:46
合計ジャッジ時間 964 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,892 KB
testcase_01 AC 16 ms
7,920 KB
testcase_02 AC 16 ms
7,960 KB
testcase_03 AC 15 ms
7,888 KB
testcase_04 AC 16 ms
7,884 KB
testcase_05 AC 16 ms
8,052 KB
testcase_06 AC 16 ms
7,920 KB
testcase_07 AC 15 ms
8,036 KB
testcase_08 AC 16 ms
7,972 KB
testcase_09 AC 15 ms
7,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

x, y = map(int,input().split())
r = (x*x+y*y)**0.5
i = int(r)
f = r - i
if 0 <= f < 0.5:
    print(i*2+1)
else:
    print(math.ceil(r)*2)
0