結果

問題 No.1237 EXP Multiple!
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2020-09-25 23:38:20
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 314 bytes
コンパイル時間 506 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 104,772 KB
最終ジャッジ日時 2023-09-10 17:30:38
合計ジャッジ時間 3,703 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,604 KB
testcase_01 AC 100 ms
96,656 KB
testcase_02 AC 117 ms
99,220 KB
testcase_03 AC 118 ms
99,524 KB
testcase_04 AC 121 ms
99,272 KB
testcase_05 AC 138 ms
104,456 KB
testcase_06 AC 103 ms
103,456 KB
testcase_07 AC 108 ms
104,612 KB
testcase_08 AC 110 ms
104,524 KB
testcase_09 AC 107 ms
104,516 KB
testcase_10 AC 138 ms
104,772 KB
testcase_11 AC 103 ms
103,536 KB
testcase_12 AC 105 ms
104,460 KB
testcase_13 AC 106 ms
104,128 KB
testcase_14 AC 107 ms
104,492 KB
testcase_15 AC 107 ms
104,124 KB
testcase_16 AC 107 ms
104,128 KB
testcase_17 AC 107 ms
104,464 KB
testcase_18 AC 107 ms
104,252 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
import math
import sys
mod = 10**9+7

N = int(input())

A = list(map(int,stdin.readline().split()))

now = 1

for i in A:

    if i > 10 or now > 10**9+7:
        print (10**9+7)
        sys.exit()

    now *= i ** math.factorial(i)


if now == 0:
    print (-1)
else:
    print (mod % now)
0