結果

問題 No.1882 Areas of Triangle
ユーザー tnodinotnodino
提出日時 2022-05-25 22:51:24
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 11,816 KB
実行使用メモリ 20,828 KB
最終ジャッジ日時 2023-10-20 19:15:15
合計ジャッジ時間 5,743 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,108 KB
testcase_01 AC 26 ms
10,108 KB
testcase_02 AC 26 ms
10,108 KB
testcase_03 AC 25 ms
10,108 KB
testcase_04 AC 191 ms
19,860 KB
testcase_05 AC 208 ms
20,828 KB
testcase_06 AC 186 ms
20,824 KB
testcase_07 AC 26 ms
10,108 KB
testcase_08 AC 26 ms
10,108 KB
testcase_09 AC 27 ms
10,108 KB
testcase_10 AC 27 ms
10,108 KB
testcase_11 AC 25 ms
10,108 KB
testcase_12 AC 25 ms
10,108 KB
testcase_13 AC 24 ms
10,108 KB
testcase_14 AC 24 ms
10,108 KB
testcase_15 AC 26 ms
10,108 KB
testcase_16 AC 28 ms
10,140 KB
testcase_17 AC 28 ms
10,192 KB
testcase_18 AC 29 ms
10,444 KB
testcase_19 AC 39 ms
11,220 KB
testcase_20 AC 41 ms
11,220 KB
testcase_21 AC 44 ms
11,220 KB
testcase_22 AC 42 ms
11,220 KB
testcase_23 AC 77 ms
13,248 KB
testcase_24 AC 74 ms
13,248 KB
testcase_25 AC 26 ms
10,108 KB
testcase_26 AC 26 ms
10,108 KB
testcase_27 AC 25 ms
10,108 KB
testcase_28 AC 26 ms
10,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
N,K = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
K *= 2
ans = 0
for i in range(N):
    b = K / A[i]
    ans += N - bisect_left(A, b)
print(ans)
0