結果

問題 No.1237 EXP Multiple!
ユーザー daikisuyamadaikisuyama
提出日時 2020-09-26 11:08:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 86,584 KB
実行使用メモリ 104,636 KB
最終ジャッジ日時 2023-09-11 06:58:21
合計ジャッジ時間 3,882 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,824 KB
testcase_01 AC 106 ms
97,924 KB
testcase_02 AC 126 ms
99,776 KB
testcase_03 AC 127 ms
99,688 KB
testcase_04 AC 127 ms
98,888 KB
testcase_05 AC 108 ms
103,576 KB
testcase_06 AC 107 ms
103,676 KB
testcase_07 AC 108 ms
103,676 KB
testcase_08 AC 112 ms
104,468 KB
testcase_09 AC 108 ms
103,792 KB
testcase_10 AC 108 ms
103,604 KB
testcase_11 AC 108 ms
103,736 KB
testcase_12 AC 107 ms
103,524 KB
testcase_13 WA -
testcase_14 AC 111 ms
104,560 KB
testcase_15 AC 112 ms
104,256 KB
testcase_16 AC 113 ms
104,468 KB
testcase_17 AC 111 ms
104,636 KB
testcase_18 AC 111 ms
104,484 KB
testcase_19 AC 108 ms
103,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
#ギャグ
mod=10**9+7
if max(a)>3:
    print(mod)
    exit()
if min(a)==0:
    print(-1)
    exit()
ans=1
for i in a:
    sub=1
    for j in range(i):
        sub*=(j+1)
    ans*=(i**sub)
    if ans>10**9+7:
        print(mod)
        exit()
print(mod%ans if mod%ans!=0 else -1)
0