結果

問題 No.1237 EXP Multiple!
ユーザー first_vilfirst_vil
提出日時 2020-09-26 09:50:14
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 290 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 86,660 KB
実行使用メモリ 105,208 KB
最終ジャッジ日時 2023-09-11 05:13:54
合計ジャッジ時間 5,946 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,948 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 111 ms
103,816 KB
testcase_06 AC 113 ms
103,712 KB
testcase_07 AC 113 ms
103,936 KB
testcase_08 AC 116 ms
104,300 KB
testcase_09 AC 113 ms
103,896 KB
testcase_10 AC 112 ms
103,692 KB
testcase_11 AC 113 ms
103,876 KB
testcase_12 RE -
testcase_13 AC 113 ms
104,020 KB
testcase_14 AC 114 ms
104,252 KB
testcase_15 AC 114 ms
104,220 KB
testcase_16 AC 113 ms
104,240 KB
testcase_17 AC 112 ms
104,096 KB
testcase_18 AC 114 ms
104,240 KB
testcase_19 AC 111 ms
103,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
if min(a)==0:
  print(-1)
  exit(0)
if 4<=max(a):
  print(m)
  exit(0)
m=10**9+7
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