結果

問題 No.1816 MUL-DIV Game
ユーザー tktk_snsntktk_snsn
提出日時 2022-05-13 12:53:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 18,980 KB
最終ジャッジ日時 2023-09-28 15:55:29
合計ジャッジ時間 2,601 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,088 KB
testcase_01 AC 16 ms
8,080 KB
testcase_02 AC 16 ms
8,128 KB
testcase_03 AC 16 ms
8,064 KB
testcase_04 AC 16 ms
8,128 KB
testcase_05 AC 16 ms
8,172 KB
testcase_06 AC 15 ms
8,080 KB
testcase_07 AC 16 ms
8,188 KB
testcase_08 AC 16 ms
8,164 KB
testcase_09 AC 18 ms
9,100 KB
testcase_10 AC 30 ms
12,884 KB
testcase_11 AC 28 ms
12,240 KB
testcase_12 AC 25 ms
11,332 KB
testcase_13 AC 46 ms
14,736 KB
testcase_14 AC 33 ms
11,552 KB
testcase_15 AC 38 ms
12,840 KB
testcase_16 AC 21 ms
9,256 KB
testcase_17 AC 59 ms
17,072 KB
testcase_18 AC 56 ms
16,548 KB
testcase_19 AC 36 ms
12,272 KB
testcase_20 AC 61 ms
17,248 KB
testcase_21 AC 30 ms
11,320 KB
testcase_22 AC 27 ms
10,476 KB
testcase_23 AC 16 ms
7,776 KB
testcase_24 AC 16 ms
7,776 KB
testcase_25 AC 72 ms
18,940 KB
testcase_26 AC 46 ms
18,976 KB
testcase_27 AC 69 ms
18,980 KB
testcase_28 AC 47 ms
18,800 KB
testcase_29 AC 71 ms
18,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

if N == 1:
    print(A[0])
    exit()

if N == 2:
    print(A[0] * A[1])
    exit()

if N % 2 == 1:
    print(1)
    exit()

A.sort()
print(min(A[2], A[0] * A[1]))
0