結果

問題 No.1237 EXP Multiple!
ユーザー MineMine
提出日時 2021-01-28 18:58:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 632 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 816,528 KB
最終ジャッジ日時 2023-09-08 10:07:37
合計ジャッジ時間 6,160 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,864 KB
testcase_01 AC 92 ms
23,700 KB
testcase_02 AC 122 ms
29,292 KB
testcase_03 AC 121 ms
30,064 KB
testcase_04 AC 77 ms
30,744 KB
testcase_05 WA -
testcase_06 AC 48 ms
12,140 KB
testcase_07 WA -
testcase_08 AC 49 ms
12,204 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 51 ms
12,184 KB
testcase_12 AC 49 ms
12,272 KB
testcase_13 AC 88 ms
12,208 KB
testcase_14 MLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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