結果

問題 No.1280 Beyond C
ユーザー uni_pythonuni_python
提出日時 2020-11-06 21:47:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 667 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 96,828 KB
最終ジャッジ日時 2023-09-29 18:35:17
合計ジャッジ時間 3,811 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,344 KB
testcase_01 AC 71 ms
71,356 KB
testcase_02 AC 68 ms
71,460 KB
testcase_03 AC 68 ms
71,336 KB
testcase_04 AC 72 ms
71,280 KB
testcase_05 AC 71 ms
71,240 KB
testcase_06 AC 70 ms
71,372 KB
testcase_07 AC 70 ms
71,396 KB
testcase_08 AC 69 ms
71,384 KB
testcase_09 AC 69 ms
71,460 KB
testcase_10 AC 70 ms
71,532 KB
testcase_11 AC 78 ms
76,060 KB
testcase_12 AC 69 ms
71,212 KB
testcase_13 AC 75 ms
76,164 KB
testcase_14 AC 76 ms
76,240 KB
testcase_15 AC 142 ms
89,576 KB
testcase_16 AC 124 ms
87,420 KB
testcase_17 AC 138 ms
90,388 KB
testcase_18 AC 130 ms
95,476 KB
testcase_19 WA -
testcase_20 AC 202 ms
96,820 KB
testcase_21 AC 182 ms
96,660 KB
testcase_22 AC 202 ms
96,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))


N,M,C=MI()
A=LI()
B=LI()
A.sort()
B.sort()


import bisect

ans=0
for i in range(N):
    a=A[i]
    t=C/a
    num=bisect.bisect_right(B,t)
    ans+=M-num
    
def my_round(x,y,a):
    ans=x//y
    rem=x%y
    L=[0]*a
    for i in range(a):
        rem*=10
        temp=(rem//y)
        # print(i,temp)
        L[i]=temp
        rem%=y
    rem*=10
    temp=(rem//y)
    if temp>=5:
        L[-1]+=1
    ans=str(ans)+"."+"".join(map(str,L))
    
    return float(ans)

ans=my_round(ans,N*M,7)

print(ans)
    
0