結果
問題 | No.98 円を描こう |
ユーザー | mitsushino |
提出日時 | 2018-03-16 18:31:16 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 277 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 10,628 KB |
実行使用メモリ | 8,056 KB |
最終ジャッジ日時 | 2023-08-23 11:53:48 |
合計ジャッジ時間 | 887 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,924 KB |
testcase_01 | AC | 16 ms
7,788 KB |
testcase_02 | AC | 15 ms
8,056 KB |
testcase_03 | AC | 15 ms
8,020 KB |
testcase_04 | AC | 15 ms
7,872 KB |
testcase_05 | AC | 15 ms
7,816 KB |
testcase_06 | WA | - |
testcase_07 | AC | 15 ms
7,880 KB |
testcase_08 | AC | 15 ms
7,812 KB |
testcase_09 | WA | - |
ソースコード
import math if __name__ == '__main__': xy = list(map(int, input().split())) x, y = xy[0], xy[1] hypotenuse = math.sqrt(x ** 2 + y ** 2) if hypotenuse == int(hypotenuse): print(int(hypotenuse) * 2 + 1) else: print(math.ceil(hypotenuse) * 2)