結果

問題 No.1816 MUL-DIV Game
ユーザー lloyzlloyz
提出日時 2022-01-21 22:28:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 91,356 KB
最終ジャッジ日時 2023-08-17 06:43:21
合計ジャッジ時間 4,587 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,244 KB
testcase_01 AC 75 ms
71,296 KB
testcase_02 AC 76 ms
71,132 KB
testcase_03 AC 73 ms
71,476 KB
testcase_04 AC 72 ms
71,320 KB
testcase_05 AC 72 ms
71,452 KB
testcase_06 AC 71 ms
71,148 KB
testcase_07 AC 73 ms
71,392 KB
testcase_08 AC 71 ms
71,256 KB
testcase_09 AC 85 ms
75,608 KB
testcase_10 AC 88 ms
80,804 KB
testcase_11 AC 87 ms
80,080 KB
testcase_12 AC 83 ms
78,456 KB
testcase_13 AC 95 ms
84,044 KB
testcase_14 AC 84 ms
79,264 KB
testcase_15 AC 89 ms
81,160 KB
testcase_16 AC 77 ms
75,632 KB
testcase_17 AC 107 ms
88,792 KB
testcase_18 AC 105 ms
87,544 KB
testcase_19 AC 87 ms
80,036 KB
testcase_20 AC 107 ms
88,912 KB
testcase_21 AC 85 ms
78,440 KB
testcase_22 AC 84 ms
77,548 KB
testcase_23 AC 73 ms
71,352 KB
testcase_24 AC 73 ms
71,244 KB
testcase_25 AC 109 ms
91,140 KB
testcase_26 AC 111 ms
91,356 KB
testcase_27 AC 109 ms
90,948 KB
testcase_28 AC 109 ms
91,040 KB
testcase_29 AC 110 ms
91,056 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])
elif n % 2 == 1:
    print(1)
else:
    if A[1] == 1:
        print(1)
    elif A[0] == 1:
        print(A[1])
    else:
        print(min(A[0] * A[1], A[2]))
0