結果

問題 No.2008 Super Worker
コンテスト
ユーザー Kiri8128
提出日時 2021-08-21 16:38:26
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 306 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 233 ms
コンパイル使用メモリ 85,292 KB
実行使用メモリ 93,100 KB
最終ジャッジ日時 2026-03-27 16:55:18
合計ジャッジ時間 6,154 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 TLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import permutations
N = int(input())
A = [int(a) for a in input().split()]
B = [int(a) for a in input().split()]
ans = 0
for a in permutations([i for i in range(N)]):
    s = 0
    l = 1
    for i in a:
        s += l * A[i]
        l *= B[i]
    ans = max(ans, s)
print(ans % (10 ** 9 + 7))
0