結果

問題 No.1237 EXP Multiple!
ユーザー 👑 KazunKazun
提出日時 2020-09-25 21:37:48
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 221 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 104,844 KB
最終ジャッジ日時 2023-09-10 17:22:22
合計ジャッジ時間 3,762 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,384 KB
testcase_01 AC 122 ms
98,264 KB
testcase_02 AC 126 ms
100,144 KB
testcase_03 AC 127 ms
100,376 KB
testcase_04 AC 129 ms
99,476 KB
testcase_05 AC 110 ms
104,548 KB
testcase_06 AC 108 ms
104,012 KB
testcase_07 AC 111 ms
104,572 KB
testcase_08 AC 110 ms
104,544 KB
testcase_09 AC 110 ms
104,836 KB
testcase_10 AC 111 ms
104,844 KB
testcase_11 AC 111 ms
104,060 KB
testcase_12 AC 110 ms
103,980 KB
testcase_13 AC 110 ms
104,620 KB
testcase_14 AC 111 ms
104,392 KB
testcase_15 AC 110 ms
104,752 KB
testcase_16 AC 110 ms
104,620 KB
testcase_17 AC 110 ms
104,428 KB
testcase_18 AC 108 ms
104,584 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

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

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