結果

問題 No.1237 EXP Multiple!
ユーザー first_vilfirst_vil
提出日時 2020-09-26 09:51:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 104,468 KB
最終ジャッジ日時 2023-09-11 05:16:40
合計ジャッジ時間 4,224 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,036 KB
testcase_01 AC 110 ms
98,260 KB
testcase_02 AC 130 ms
99,868 KB
testcase_03 AC 132 ms
99,960 KB
testcase_04 AC 130 ms
99,176 KB
testcase_05 AC 105 ms
103,784 KB
testcase_06 AC 110 ms
104,032 KB
testcase_07 AC 107 ms
103,904 KB
testcase_08 AC 111 ms
104,132 KB
testcase_09 AC 109 ms
104,040 KB
testcase_10 AC 109 ms
103,628 KB
testcase_11 AC 110 ms
103,892 KB
testcase_12 AC 107 ms
103,772 KB
testcase_13 AC 109 ms
104,260 KB
testcase_14 AC 111 ms
104,304 KB
testcase_15 AC 110 ms
103,980 KB
testcase_16 AC 110 ms
104,468 KB
testcase_17 AC 108 ms
104,064 KB
testcase_18 AC 109 ms
104,288 KB
testcase_19 AC 106 ms
103,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
m=10**9+7
if min(a)==0:
  print(-1)
  exit(0)
if 4<=max(a):
  print(m)
  exit(0)
x=1
for i in a:
  if i==1:
    continue
  y=1
  for j in range(1,i+1):
    y*=j
  for k in range(y):
    x*=i
    if m<x:
      print(m)
      exit(0)
print(m%x)
0