結果

問題 No.1009 面積の求め方
ユーザー splash9494splash9494
提出日時 2020-05-05 19:48:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 76,284 KB
最終ジャッジ日時 2023-09-09 08:48:09
合計ジャッジ時間 2,800 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
76,004 KB
testcase_01 AC 70 ms
76,236 KB
testcase_02 AC 70 ms
76,116 KB
testcase_03 AC 71 ms
76,096 KB
testcase_04 AC 70 ms
75,940 KB
testcase_05 AC 71 ms
76,068 KB
testcase_06 AC 70 ms
76,008 KB
testcase_07 AC 72 ms
76,248 KB
testcase_08 AC 69 ms
76,108 KB
testcase_09 AC 70 ms
76,008 KB
testcase_10 AC 69 ms
76,148 KB
testcase_11 AC 69 ms
75,960 KB
testcase_12 AC 70 ms
76,284 KB
testcase_13 AC 70 ms
76,068 KB
testcase_14 AC 71 ms
76,096 KB
testcase_15 AC 71 ms
76,112 KB
testcase_16 AC 69 ms
75,988 KB
testcase_17 AC 70 ms
76,000 KB
testcase_18 AC 69 ms
76,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.buffer.readline

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

N = 10 ** 4
d = (b - a) / float(N)
f = lambda x: (x - a)*(x - b)
S = 0

for i in [a + (x * d) for x in range(0, N + 1)]:
    s = abs(d * f(i))
    S += s
    
print(round(S, 7))
0