結果

問題 No.1237 EXP Multiple!
ユーザー 👑 KazunKazun
提出日時 2020-09-25 21:36:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 86,860 KB
実行使用メモリ 104,624 KB
最終ジャッジ日時 2023-09-10 15:01:06
合計ジャッジ時間 3,654 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,404 KB
testcase_01 AC 138 ms
97,892 KB
testcase_02 AC 122 ms
99,896 KB
testcase_03 AC 127 ms
100,196 KB
testcase_04 AC 126 ms
99,136 KB
testcase_05 AC 106 ms
104,348 KB
testcase_06 AC 105 ms
103,988 KB
testcase_07 AC 105 ms
104,624 KB
testcase_08 AC 108 ms
104,580 KB
testcase_09 AC 107 ms
104,560 KB
testcase_10 WA -
testcase_11 AC 106 ms
103,964 KB
testcase_12 AC 106 ms
103,964 KB
testcase_13 WA -
testcase_14 AC 108 ms
104,512 KB
testcase_15 AC 108 ms
104,188 KB
testcase_16 AC 107 ms
104,424 KB
testcase_17 AC 108 ms
104,192 KB
testcase_18 AC 108 ms
104,212 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))

if max(A)>=4:
    print(10**9+7)
    exit()

T=[1,1,4,729]
X=1
for a in A:
    X*=T[a]
    if X>=10**9+8:
        break

if (10**9+7)%X==0:
    print(-1)
else:
    print((10**9+7)%X)
0