結果

問題 No.1816 MUL-DIV Game
ユーザー wolgnikwolgnik
提出日時 2022-01-21 22:00:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 91,272 KB
最終ジャッジ日時 2023-08-17 05:58:03
合計ジャッジ時間 4,243 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,292 KB
testcase_01 AC 74 ms
71,344 KB
testcase_02 AC 75 ms
71,340 KB
testcase_03 AC 73 ms
71,292 KB
testcase_04 AC 73 ms
71,144 KB
testcase_05 AC 72 ms
71,452 KB
testcase_06 AC 74 ms
71,308 KB
testcase_07 AC 74 ms
71,280 KB
testcase_08 AC 72 ms
71,132 KB
testcase_09 AC 76 ms
75,728 KB
testcase_10 AC 82 ms
80,592 KB
testcase_11 AC 84 ms
79,676 KB
testcase_12 AC 80 ms
78,480 KB
testcase_13 AC 96 ms
84,256 KB
testcase_14 AC 87 ms
79,400 KB
testcase_15 AC 91 ms
81,076 KB
testcase_16 AC 76 ms
75,788 KB
testcase_17 AC 105 ms
88,896 KB
testcase_18 AC 101 ms
87,472 KB
testcase_19 AC 88 ms
80,152 KB
testcase_20 AC 105 ms
89,060 KB
testcase_21 AC 84 ms
78,600 KB
testcase_22 AC 83 ms
77,596 KB
testcase_23 AC 73 ms
71,280 KB
testcase_24 AC 75 ms
71,324 KB
testcase_25 AC 110 ms
91,164 KB
testcase_26 AC 95 ms
89,692 KB
testcase_27 AC 111 ms
91,232 KB
testcase_28 AC 94 ms
89,868 KB
testcase_29 AC 110 ms
91,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))

if N >= 3:
  if N & 1: print(1)
  else:
    a.sort()
    a.append(a[0] * a[1])
    a = a[2: ]
    a.sort()
    print(a[0])

else:
  res = 1
  for x in a: res *= x
  print(res)
0