結果

問題 No.1009 面積の求め方
ユーザー neterukunneterukun
提出日時 2020-03-13 19:45:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 753 ms
コンパイル使用メモリ 81,752 KB
実行使用メモリ 60,240 KB
最終ジャッジ日時 2024-05-02 05:03:43
合計ジャッジ時間 2,266 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
59,648 KB
testcase_01 AC 53 ms
59,904 KB
testcase_02 AC 47 ms
59,904 KB
testcase_03 AC 50 ms
59,648 KB
testcase_04 AC 51 ms
59,904 KB
testcase_05 AC 50 ms
59,904 KB
testcase_06 AC 50 ms
60,240 KB
testcase_07 AC 47 ms
59,648 KB
testcase_08 AC 46 ms
60,032 KB
testcase_09 AC 47 ms
59,904 KB
testcase_10 AC 48 ms
59,904 KB
testcase_11 AC 47 ms
59,648 KB
testcase_12 AC 47 ms
59,520 KB
testcase_13 AC 46 ms
59,904 KB
testcase_14 AC 46 ms
59,648 KB
testcase_15 AC 45 ms
59,776 KB
testcase_16 AC 45 ms
59,904 KB
testcase_17 AC 44 ms
59,904 KB
testcase_18 AC 44 ms
59,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x, a, b):
    return (x - a) * (x - b)

a, b = map(int, input().split())
N = 10 ** 5
width = (b - a) / N
ans = 0
for i in range(N):
    ans -= width * f(a + i * width, a, b)
print(ans)
0