結果

問題 No.2008 Super Worker
ユーザー yuusanlondonyuusanlondon
提出日時 2022-07-15 21:41:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 736 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 136,560 KB
最終ジャッジ日時 2023-09-10 01:06:06
合計ジャッジ時間 12,514 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,140 KB
testcase_01 AC 74 ms
71,392 KB
testcase_02 AC 72 ms
71,300 KB
testcase_03 AC 72 ms
71,264 KB
testcase_04 AC 73 ms
71,344 KB
testcase_05 AC 75 ms
71,360 KB
testcase_06 AC 75 ms
71,120 KB
testcase_07 AC 76 ms
71,316 KB
testcase_08 AC 75 ms
71,412 KB
testcase_09 AC 75 ms
71,140 KB
testcase_10 AC 75 ms
71,120 KB
testcase_11 AC 74 ms
71,456 KB
testcase_12 AC 74 ms
71,196 KB
testcase_13 AC 84 ms
76,668 KB
testcase_14 AC 83 ms
76,408 KB
testcase_15 AC 81 ms
76,420 KB
testcase_16 AC 83 ms
76,652 KB
testcase_17 AC 83 ms
76,508 KB
testcase_18 AC 84 ms
76,564 KB
testcase_19 AC 81 ms
75,636 KB
testcase_20 AC 83 ms
76,448 KB
testcase_21 AC 83 ms
76,380 KB
testcase_22 AC 79 ms
75,832 KB
testcase_23 AC 718 ms
136,408 KB
testcase_24 AC 717 ms
136,452 KB
testcase_25 AC 727 ms
136,560 KB
testcase_26 AC 732 ms
136,328 KB
testcase_27 AC 736 ms
136,536 KB
testcase_28 AC 695 ms
126,360 KB
testcase_29 AC 729 ms
126,364 KB
testcase_30 AC 697 ms
126,164 KB
testcase_31 AC 700 ms
126,208 KB
testcase_32 AC 687 ms
126,216 KB
testcase_33 AC 220 ms
124,560 KB
testcase_34 AC 685 ms
126,752 KB
testcase_35 AC 590 ms
128,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD=10**9+7
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
p=[]
for i in range(n):
    p.append(((b[i]-1)/a[i],b[i],a[i]))
p.sort()
p.reverse()
currlev=1
ans=0 
for i in range(n):
  _,b1,a1=p[i]
  ans=(ans+currlev*a1)%MOD
  currlev=(currlev*b1)%MOD
print(ans)
0