結果

問題 No.989 N×Mマス計算(K以上)
ユーザー ntudantuda
提出日時 2024-01-01 20:31:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 86,584 KB
最終ジャッジ日時 2024-01-01 20:31:48
合計ジャッジ時間 2,639 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 AC 32 ms
53,460 KB
testcase_02 AC 34 ms
53,460 KB
testcase_03 AC 34 ms
53,460 KB
testcase_04 AC 32 ms
53,460 KB
testcase_05 AC 33 ms
53,460 KB
testcase_06 AC 32 ms
53,460 KB
testcase_07 AC 33 ms
53,460 KB
testcase_08 AC 37 ms
53,460 KB
testcase_09 AC 37 ms
53,460 KB
testcase_10 AC 124 ms
81,376 KB
testcase_11 AC 111 ms
84,916 KB
testcase_12 AC 118 ms
83,476 KB
testcase_13 AC 88 ms
82,292 KB
testcase_14 AC 144 ms
86,584 KB
testcase_15 AC 91 ms
77,288 KB
testcase_16 AC 101 ms
79,900 KB
testcase_17 AC 92 ms
82,280 KB
testcase_18 AC 114 ms
76,448 KB
testcase_19 AC 109 ms
85,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left
N,M,K = map(int,input().split())
op, *B = input().split()
B = sorted([int(s) for s in B])
A = [int(input()) for _ in range(N)]

ans = 0
for a in A:
    if op == "+":
        c = K - a
    else:
        c = - (-K // a)
    ans += M - bisect_left(B,c)
print(ans)
0