結果

問題 No.1009 面積の求め方
ユーザー komkompikomkompi
提出日時 2020-03-29 01:28:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 279 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,944 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-08-30 18:25:29
合計ジャッジ時間 20,904 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 695 ms
7,896 KB
testcase_01 AC 15 ms
7,840 KB
testcase_02 AC 572 ms
7,816 KB
testcase_03 TLE -
testcase_04 AC 16 ms
7,780 KB
testcase_05 AC 16 ms
7,896 KB
testcase_06 AC 1,162 ms
7,756 KB
testcase_07 AC 900 ms
7,880 KB
testcase_08 AC 806 ms
7,800 KB
testcase_09 AC 233 ms
7,760 KB
testcase_10 AC 346 ms
7,900 KB
testcase_11 AC 462 ms
7,752 KB
testcase_12 AC 1,055 ms
7,820 KB
testcase_13 AC 1,248 ms
7,772 KB
testcase_14 AC 1,509 ms
7,812 KB
testcase_15 AC 1,985 ms
7,984 KB
testcase_16 TLE -
testcase_17 AC 1,406 ms
7,752 KB
testcase_18 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
def func(num):
    return num**2-a*num-b*num+a*b

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

dt=10**-5

al=(b-a)*10**5

ans=0
for i in range(al-1):
    high=(i+1)*10**-5+a
    low=i*10**-5+a
    #print(high)
    ans+=-(func(high)+func(low))/2*dt

print(ans)
0