結果
問題 | No.1237 EXP Multiple! |
ユーザー | IH |
提出日時 | 2020-09-26 21:20:49 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 295 ms |
コンパイル使用メモリ | 87,060 KB |
実行使用メモリ | 110,876 KB |
最終ジャッジ日時 | 2023-09-12 08:17:56 |
合計ジャッジ時間 | 5,090 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 77 ms
75,648 KB |
testcase_01 | AC | 130 ms
98,144 KB |
testcase_02 | AC | 131 ms
100,248 KB |
testcase_03 | AC | 130 ms
100,076 KB |
testcase_04 | AC | 129 ms
99,628 KB |
testcase_05 | AC | 109 ms
103,824 KB |
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 | -- | - |
ソースコード
import math n = int(input()) a = list(map(int,input().split())) if 0 in a: print(-1) elif max(a) >= 4: print(((10)**9)+7) else: ans = 1 for i in range(n): tmp = math.factorial(a[i]) ans *= a[i]**tmp print((((10)**9)+7)%ans)