結果

問題 No.1237 EXP Multiple!
ユーザー shotoyooshotoyoo
提出日時 2020-09-25 22:21:27
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 517 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 105,180 KB
最終ジャッジ日時 2023-09-10 15:36:47
合計ジャッジ時間 5,467 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 107 ms
103,600 KB
testcase_06 RE -
testcase_07 AC 108 ms
103,604 KB
testcase_08 RE -
testcase_09 AC 107 ms
103,856 KB
testcase_10 AC 107 ms
103,608 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 109 ms
103,808 KB
権限があれば一括ダウンロードができます

ソースコード

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