結果

問題 No.1882 Areas of Triangle
ユーザー kept1994kept1994
提出日時 2022-04-27 03:51:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 156 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 92,616 KB
最終ジャッジ日時 2023-09-10 16:31:30
合計ジャッジ時間 5,630 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,296 KB
testcase_01 AC 70 ms
71,284 KB
testcase_02 AC 70 ms
71,384 KB
testcase_03 AC 72 ms
71,596 KB
testcase_04 AC 156 ms
90,832 KB
testcase_05 AC 145 ms
92,616 KB
testcase_06 AC 128 ms
92,256 KB
testcase_07 AC 71 ms
71,356 KB
testcase_08 AC 72 ms
71,272 KB
testcase_09 AC 72 ms
71,132 KB
testcase_10 AC 72 ms
71,416 KB
testcase_11 AC 72 ms
71,396 KB
testcase_12 AC 72 ms
71,192 KB
testcase_13 AC 71 ms
71,444 KB
testcase_14 AC 72 ms
71,288 KB
testcase_15 AC 73 ms
71,228 KB
testcase_16 AC 78 ms
75,636 KB
testcase_17 AC 83 ms
76,484 KB
testcase_18 AC 83 ms
76,520 KB
testcase_19 AC 84 ms
76,692 KB
testcase_20 AC 88 ms
76,540 KB
testcase_21 AC 85 ms
76,628 KB
testcase_22 AC 93 ms
77,424 KB
testcase_23 AC 109 ms
80,064 KB
testcase_24 AC 99 ms
80,084 KB
testcase_25 AC 70 ms
71,280 KB
testcase_26 AC 73 ms
71,228 KB
testcase_27 AC 70 ms
71,344 KB
testcase_28 AC 71 ms
71,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
from bisect import bisect_left
import sys

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    A.sort()
    ans = 0
    for aa in A:
        b = K * 2 / aa
        res = N - bisect_left(A, b)
        ans += res
    print(ans)
    return


if __name__ == '__main__':
    main()
0