結果

問題 No.1334 Multiply or Add
ユーザー kozykozy
提出日時 2021-01-08 21:57:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 33,128 KB
最終ジャッジ日時 2024-04-28 02:50:24
合計ジャッジ時間 9,581 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 KB
testcase_01 AC 34 ms
10,752 KB
testcase_02 AC 31 ms
10,624 KB
testcase_03 WA -
testcase_04 AC 122 ms
14,724 KB
testcase_05 AC 123 ms
14,724 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 129 ms
14,724 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 125 ms
14,724 KB
testcase_13 AC 122 ms
14,596 KB
testcase_14 AC 119 ms
14,724 KB
testcase_15 AC 120 ms
14,596 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 125 ms
14,720 KB
testcase_23 WA -
testcase_24 AC 123 ms
14,844 KB
testcase_25 AC 123 ms
14,728 KB
testcase_26 AC 125 ms
14,596 KB
testcase_27 AC 124 ms
14,596 KB
testcase_28 AC 129 ms
14,592 KB
testcase_29 WA -
testcase_30 AC 124 ms
14,596 KB
testcase_31 AC 126 ms
14,724 KB
testcase_32 WA -
testcase_33 AC 119 ms
14,844 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 124 ms
14,848 KB
testcase_39 AC 29 ms
10,752 KB
testcase_40 AC 70 ms
11,996 KB
testcase_41 AC 43 ms
11,264 KB
testcase_42 AC 45 ms
11,264 KB
testcase_43 AC 97 ms
13,072 KB
testcase_44 AC 70 ms
12,128 KB
testcase_45 AC 46 ms
11,264 KB
testcase_46 AC 73 ms
12,160 KB
testcase_47 AC 88 ms
13,172 KB
testcase_48 AC 76 ms
12,260 KB
testcase_49 AC 113 ms
13,916 KB
testcase_50 AC 179 ms
32,992 KB
testcase_51 AC 178 ms
32,508 KB
testcase_52 AC 177 ms
32,996 KB
testcase_53 AC 178 ms
32,864 KB
testcase_54 AC 177 ms
32,992 KB
testcase_55 AC 175 ms
33,128 KB
testcase_56 AC 29 ms
10,752 KB
testcase_57 AC 29 ms
10,752 KB
testcase_58 AC 29 ms
10,624 KB
testcase_59 WA -
testcase_60 AC 29 ms
10,752 KB
testcase_61 WA -
testcase_62 AC 29 ms
10,752 KB
testcase_63 WA -
testcase_64 AC 30 ms
10,624 KB
testcase_65 AC 29 ms
10,624 KB
testcase_66 AC 151 ms
28,344 KB
testcase_67 AC 108 ms
22,332 KB
testcase_68 AC 34 ms
11,136 KB
testcase_69 AC 166 ms
31,080 KB
testcase_70 AC 161 ms
29,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
C=sum(A)
mod=1000000007
J="mada"
ans=1
for i in range(N):
  ans*=A[i]
  if J=="mada":
    if ans>=C:
      J="OK"
  if J=="OK":
    ans%=mod
if J=="mada":
  print(C%mod)
else:
  print(ans%mod)
0