結果

問題 No.1009 面積の求め方
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2023-06-29 11:16:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 8,008 KB
最終ジャッジ日時 2023-09-20 06:40:11
合計ジャッジ時間 15,193 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 638 ms
7,832 KB
testcase_01 AC 615 ms
7,872 KB
testcase_02 WA -
testcase_03 AC 655 ms
7,828 KB
testcase_04 AC 647 ms
7,880 KB
testcase_05 AC 655 ms
7,784 KB
testcase_06 WA -
testcase_07 AC 670 ms
7,828 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 665 ms
7,832 KB
testcase_18 AC 661 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = 10**6


def f(x, aa, bb):
    return (x - aa) * (x - bb)


a, b = map(int, input().split())

ans = 0
for k in range(N):
    ans += abs(f(a + b * k / N, a, b)) * (b - a) / N

print(round(ans, 6))
0