結果

問題 No.1816 MUL-DIV Game
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-22 00:34:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 91,336 KB
最終ジャッジ日時 2023-08-17 11:47:21
合計ジャッジ時間 4,359 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,324 KB
testcase_01 AC 77 ms
71,352 KB
testcase_02 AC 75 ms
71,404 KB
testcase_03 AC 75 ms
71,420 KB
testcase_04 AC 76 ms
71,128 KB
testcase_05 AC 75 ms
71,432 KB
testcase_06 AC 75 ms
71,440 KB
testcase_07 AC 73 ms
71,384 KB
testcase_08 AC 72 ms
71,480 KB
testcase_09 AC 74 ms
75,680 KB
testcase_10 AC 92 ms
81,364 KB
testcase_11 AC 86 ms
80,284 KB
testcase_12 AC 83 ms
78,604 KB
testcase_13 AC 92 ms
84,256 KB
testcase_14 AC 83 ms
79,540 KB
testcase_15 AC 87 ms
81,312 KB
testcase_16 AC 73 ms
75,704 KB
testcase_17 AC 101 ms
88,964 KB
testcase_18 AC 99 ms
87,540 KB
testcase_19 AC 84 ms
80,512 KB
testcase_20 AC 102 ms
89,076 KB
testcase_21 AC 80 ms
78,644 KB
testcase_22 AC 78 ms
77,776 KB
testcase_23 AC 68 ms
71,540 KB
testcase_24 AC 69 ms
71,360 KB
testcase_25 AC 106 ms
91,220 KB
testcase_26 AC 105 ms
91,260 KB
testcase_27 AC 106 ms
91,200 KB
testcase_28 AC 105 ms
91,336 KB
testcase_29 AC 107 ms
91,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
A.sort()

if n == 1:
    print(A[0])
elif n == 2:
    print(A[0]*A[1])
else:
    if n%2 == 1:
        print(1)
    else:
        ans = min(A[0]*A[1], A[2])
        print(ans)
0