結果

問題 No.1009 面積の求め方
ユーザー neterukunneterukun
提出日時 2020-03-13 19:45:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 1,117 ms
コンパイル使用メモリ 87,000 KB
実行使用メモリ 76,124 KB
最終ジャッジ日時 2023-08-14 16:55:51
合計ジャッジ時間 3,127 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,864 KB
testcase_01 AC 78 ms
75,828 KB
testcase_02 AC 77 ms
75,956 KB
testcase_03 AC 78 ms
76,112 KB
testcase_04 AC 77 ms
75,780 KB
testcase_05 AC 77 ms
75,908 KB
testcase_06 AC 77 ms
75,992 KB
testcase_07 AC 77 ms
75,864 KB
testcase_08 AC 76 ms
75,764 KB
testcase_09 AC 76 ms
76,124 KB
testcase_10 AC 77 ms
75,956 KB
testcase_11 AC 77 ms
75,768 KB
testcase_12 AC 79 ms
75,988 KB
testcase_13 AC 76 ms
75,860 KB
testcase_14 AC 76 ms
75,868 KB
testcase_15 AC 78 ms
75,864 KB
testcase_16 AC 77 ms
75,740 KB
testcase_17 AC 78 ms
75,832 KB
testcase_18 AC 78 ms
75,832 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