結果

問題 No.1816 MUL-DIV Game
ユーザー horitaka1999horitaka1999
提出日時 2022-01-21 23:08:34
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 91,144 KB
最終ジャッジ日時 2023-08-17 07:40:53
合計ジャッジ時間 4,299 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,624 KB
testcase_01 AC 75 ms
71,228 KB
testcase_02 AC 71 ms
71,500 KB
testcase_03 AC 70 ms
71,528 KB
testcase_04 AC 71 ms
71,292 KB
testcase_05 AC 72 ms
71,248 KB
testcase_06 AC 71 ms
71,272 KB
testcase_07 AC 72 ms
71,264 KB
testcase_08 AC 70 ms
71,248 KB
testcase_09 AC 84 ms
75,716 KB
testcase_10 AC 90 ms
80,876 KB
testcase_11 AC 86 ms
80,168 KB
testcase_12 AC 87 ms
78,612 KB
testcase_13 AC 97 ms
84,612 KB
testcase_14 AC 87 ms
79,128 KB
testcase_15 AC 88 ms
81,092 KB
testcase_16 AC 75 ms
75,508 KB
testcase_17 AC 103 ms
88,856 KB
testcase_18 AC 99 ms
87,356 KB
testcase_19 AC 85 ms
80,168 KB
testcase_20 AC 101 ms
88,964 KB
testcase_21 AC 81 ms
78,660 KB
testcase_22 AC 78 ms
77,288 KB
testcase_23 AC 69 ms
71,032 KB
testcase_24 AC 69 ms
71,160 KB
testcase_25 AC 107 ms
91,040 KB
testcase_26 AC 107 ms
91,144 KB
testcase_27 AC 108 ms
91,048 KB
testcase_28 AC 108 ms
91,052 KB
testcase_29 AC 110 ms
91,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N =int(input())
A = list(map(int,input().split()))
A.sort()
if N==1:
    out = A[0]
elif N==2:
    out = A[0] * A[1]
else:
    if N%2 == 0:
        out = min(A[2], A[0]*A[1])
    else:
        out = 1

print(out)
0