結果

問題 No.1237 EXP Multiple!
ユーザー Mine
提出日時 2021-01-28 18:58:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 817,564 KB
最終ジャッジ日時 2024-06-26 03:27:59
合計ジャッジ時間 4,544 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9 WA * 4 MLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
moddehanai = 10**9 + 7
a.sort(reverse=True)
if a[0] >= 4:
    print(moddehanai)
elif a[-1] == 0:
    print(0)
else:
    s = 1
    end = False
    for i in range(n):
        if a[i] == 3:
            s *= 3**6
        elif a[i] == 2:
            a *= 2**2
        if s > moddehanai:
            end = True
            print(moddehanai)
            break
    if not end:
        print(moddehanai % s)
0