結果

問題 No.1237 EXP Multiple!
ユーザー daikisuyamadaikisuyama
提出日時 2020-09-26 11:07:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 144,488 KB
最終ジャッジ日時 2023-09-11 06:56:37
合計ジャッジ時間 5,139 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,480 KB
testcase_01 AC 115 ms
97,860 KB
testcase_02 AC 126 ms
99,496 KB
testcase_03 AC 127 ms
99,692 KB
testcase_04 AC 129 ms
98,960 KB
testcase_05 WA -
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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(0)
    exit()
ans=1
for i in a:
    sub=1
    for j in range(i):
        sub*=(j+1)
    ans*=(i**sub)
print(mod%ans if mod%ans!=0 else -1)
0