結果

問題 No.1280 Beyond C
ユーザー uni_pythonuni_python
提出日時 2020-11-06 21:49:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 266 ms / 2,000 ms
コード長 675 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 97,512 KB
最終ジャッジ日時 2023-09-29 18:36:45
合計ジャッジ時間 4,366 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,416 KB
testcase_01 AC 70 ms
71,308 KB
testcase_02 AC 71 ms
71,300 KB
testcase_03 AC 71 ms
71,280 KB
testcase_04 AC 69 ms
71,356 KB
testcase_05 AC 70 ms
71,300 KB
testcase_06 AC 73 ms
71,360 KB
testcase_07 AC 72 ms
71,092 KB
testcase_08 AC 71 ms
71,360 KB
testcase_09 AC 72 ms
71,300 KB
testcase_10 AC 71 ms
71,436 KB
testcase_11 AC 97 ms
76,832 KB
testcase_12 AC 70 ms
71,168 KB
testcase_13 AC 77 ms
76,168 KB
testcase_14 AC 85 ms
76,624 KB
testcase_15 AC 193 ms
89,436 KB
testcase_16 AC 162 ms
87,324 KB
testcase_17 AC 178 ms
89,848 KB
testcase_18 AC 185 ms
95,724 KB
testcase_19 AC 183 ms
95,808 KB
testcase_20 AC 264 ms
97,388 KB
testcase_21 AC 254 ms
97,512 KB
testcase_22 AC 266 ms
97,284 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()

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)

import bisect

ans=0
for i in range(N):
    a=A[i]
    t=my_round(C,a,3)
    num=bisect.bisect_right(B,t)
    ans+=M-num


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

print(ans)
    
0