結果

問題 No.1237 EXP Multiple!
ユーザー shotoyoo
提出日時 2020-09-25 22:21:27
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 517 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 82,360 KB
実行使用メモリ 107,684 KB
最終ジャッジ日時 2024-06-28 06:44:23
合計ジャッジ時間 3,036 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other AC * 5 RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
a = list(map(int, input().split()))
if 0 in a:
    ans = -1
else:
    v = 1
    for k in a:
        if k==1:
            pass
        elif k>=4:
            ans = M
            break
        else:
            d = [1,1,2,6]
            v *= pow(k, d[k])
            if v>M:
                ans = M
                break
    else:
        ans = M%v
print(ans)
0