結果

問題 No.1816 MUL-DIV Game
ユーザー ああいいああいい
提出日時 2022-01-21 22:47:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 440 bytes
コンパイル時間 1,518 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 91,384 KB
最終ジャッジ日時 2023-08-17 07:08:12
合計ジャッジ時間 4,948 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,364 KB
testcase_01 AC 74 ms
71,196 KB
testcase_02 AC 74 ms
71,524 KB
testcase_03 AC 73 ms
71,344 KB
testcase_04 AC 74 ms
71,164 KB
testcase_05 AC 80 ms
71,128 KB
testcase_06 AC 75 ms
71,428 KB
testcase_07 AC 75 ms
70,980 KB
testcase_08 AC 76 ms
71,136 KB
testcase_09 AC 88 ms
75,412 KB
testcase_10 AC 94 ms
80,780 KB
testcase_11 AC 92 ms
79,960 KB
testcase_12 AC 88 ms
78,404 KB
testcase_13 AC 101 ms
84,200 KB
testcase_14 AC 88 ms
79,000 KB
testcase_15 AC 93 ms
80,960 KB
testcase_16 AC 82 ms
75,508 KB
testcase_17 AC 110 ms
89,060 KB
testcase_18 AC 105 ms
87,308 KB
testcase_19 AC 92 ms
80,016 KB
testcase_20 AC 112 ms
88,940 KB
testcase_21 AC 92 ms
78,480 KB
testcase_22 AC 84 ms
77,360 KB
testcase_23 AC 75 ms
71,104 KB
testcase_24 AC 76 ms
71,492 KB
testcase_25 AC 115 ms
91,020 KB
testcase_26 AC 114 ms
91,384 KB
testcase_27 AC 113 ms
91,068 KB
testcase_28 AC 115 ms
90,988 KB
testcase_29 AC 115 ms
90,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
A.sort()
import sys
import heapq
"""
if N == 1:
    print(A[0])
    exit()
if N % 2 == 1:
    print(1)
    exit()
heapq.heapify(A)
for _ in range(N//2):
    a = heapq.heappop(A)
    b = heapq.heappop(A)
    heapq.heappush(A,a * b)
print(heapq.heappop(A))
"""
if N == 1:
    print(A[0])
elif N == 2:
    print(A[0] * A[1])
elif N % 2 == 1:
    print(1)
else:
    print(min(A[0]*A[1],A[2]))
0