結果

問題 No.1009 面積の求め方
ユーザー ssmkzkssmkzk
提出日時 2020-10-30 16:26:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 221 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 10,496 KB
実行使用メモリ 30,148 KB
最終ジャッジ日時 2023-09-29 04:22:42
合計ジャッジ時間 6,887 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 215 ms
29,884 KB
testcase_01 AC 137 ms
29,400 KB
testcase_02 AC 220 ms
30,140 KB
testcase_03 AC 216 ms
29,872 KB
testcase_04 AC 140 ms
29,516 KB
testcase_05 AC 138 ms
29,260 KB
testcase_06 AC 215 ms
29,696 KB
testcase_07 AC 218 ms
30,144 KB
testcase_08 AC 215 ms
29,984 KB
testcase_09 AC 215 ms
29,928 KB
testcase_10 AC 216 ms
29,884 KB
testcase_11 AC 221 ms
29,972 KB
testcase_12 AC 219 ms
30,148 KB
testcase_13 AC 213 ms
29,768 KB
testcase_14 AC 217 ms
30,048 KB
testcase_15 AC 219 ms
29,960 KB
testcase_16 AC 211 ms
29,764 KB
testcase_17 AC 214 ms
30,032 KB
testcase_18 AC 214 ms
29,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
a, b = map(int, input().split())
dis = (b - a)/100000
# count = 0
ans = 0
if dis == 0:
    print(0)
else:
    for i in np.arange(a, b, dis):
        # print(((i**2) - ((a + b)*i) + (a*b) ))
        ans += abs((i**2) - ((a + b)*i) + (a*b) )
        # count += 1
        # if count > 95000:
        #     print(i)
    print(ans*dis)
0