結果

問題 No.1237 EXP Multiple!
ユーザー tikitaka1201tikitaka1201
提出日時 2020-09-26 19:28:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 2,209 ms
コンパイル使用メモリ 86,112 KB
実行使用メモリ 109,120 KB
最終ジャッジ日時 2023-09-12 01:00:10
合計ジャッジ時間 4,226 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,016 KB
testcase_01 AC 131 ms
105,576 KB
testcase_02 AC 124 ms
103,684 KB
testcase_03 AC 127 ms
103,656 KB
testcase_04 AC 129 ms
103,808 KB
testcase_05 AC 108 ms
108,592 KB
testcase_06 AC 109 ms
108,376 KB
testcase_07 AC 110 ms
108,436 KB
testcase_08 AC 112 ms
109,120 KB
testcase_09 AC 111 ms
108,480 KB
testcase_10 AC 112 ms
108,328 KB
testcase_11 AC 115 ms
108,256 KB
testcase_12 AC 113 ms
109,108 KB
testcase_13 AC 111 ms
108,704 KB
testcase_14 AC 111 ms
109,016 KB
testcase_15 AC 110 ms
109,080 KB
testcase_16 AC 112 ms
109,108 KB
testcase_17 AC 112 ms
108,948 KB
testcase_18 AC 112 ms
109,076 KB
testcase_19 AC 111 ms
108,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
*A,=map(int, input().split())
mod=10**9+7

if min(A)==0:
    print(-1)
    exit()

pattern=[0,1,2**2,3**6]
ans=1
for a in A:
    if a>3:
        print(mod)
        exit()
    else:
        ans*=pattern[a]
    if ans>mod:
        print(mod)
        exit()
    
print(mod%ans)
0