結果
問題 | No.1237 EXP Multiple! |
ユーザー | 👑 SPD_9X2 |
提出日時 | 2020-09-25 23:37:12 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 372 ms |
コンパイル使用メモリ | 87,036 KB |
実行使用メモリ | 105,044 KB |
最終ジャッジ日時 | 2023-09-10 17:11:09 |
合計ジャッジ時間 | 4,253 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
70,992 KB |
testcase_01 | AC | 101 ms
96,664 KB |
testcase_02 | AC | 119 ms
99,180 KB |
testcase_03 | AC | 121 ms
99,276 KB |
testcase_04 | AC | 121 ms
99,440 KB |
testcase_05 | RE | - |
testcase_06 | AC | 102 ms
103,472 KB |
testcase_07 | RE | - |
testcase_08 | AC | 107 ms
104,172 KB |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | AC | 103 ms
103,556 KB |
testcase_12 | AC | 106 ms
104,088 KB |
testcase_13 | WA | - |
testcase_14 | AC | 108 ms
104,004 KB |
testcase_15 | AC | 108 ms
104,136 KB |
testcase_16 | AC | 108 ms
104,476 KB |
testcase_17 | AC | 109 ms
104,388 KB |
testcase_18 | AC | 108 ms
104,352 KB |
testcase_19 | WA | - |
ソースコード
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) ans = mod % now if ans == 0: print (-1) else: print (ans)