結果

問題 No.1816 MUL-DIV Game
ユーザー AEnAEn
提出日時 2022-12-03 15:50:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 206 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 86,272 KB
最終ジャッジ日時 2024-04-19 01:31:29
合計ジャッジ時間 3,276 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,968 KB
testcase_01 AC 38 ms
51,840 KB
testcase_02 AC 43 ms
51,584 KB
testcase_03 AC 39 ms
51,456 KB
testcase_04 AC 39 ms
51,584 KB
testcase_05 AC 39 ms
51,840 KB
testcase_06 AC 39 ms
51,584 KB
testcase_07 AC 39 ms
51,968 KB
testcase_08 AC 40 ms
51,840 KB
testcase_09 AC 45 ms
60,032 KB
testcase_10 AC 53 ms
68,608 KB
testcase_11 AC 53 ms
67,200 KB
testcase_12 AC 50 ms
65,152 KB
testcase_13 AC 70 ms
75,264 KB
testcase_14 AC 57 ms
67,456 KB
testcase_15 AC 62 ms
69,888 KB
testcase_16 AC 47 ms
60,544 KB
testcase_17 AC 80 ms
82,176 KB
testcase_18 AC 78 ms
80,128 KB
testcase_19 AC 60 ms
68,864 KB
testcase_20 AC 82 ms
82,432 KB
testcase_21 AC 56 ms
66,304 KB
testcase_22 AC 53 ms
64,384 KB
testcase_23 AC 39 ms
51,584 KB
testcase_24 AC 39 ms
51,840 KB
testcase_25 AC 89 ms
86,272 KB
testcase_26 AC 68 ms
81,920 KB
testcase_27 AC 92 ms
86,144 KB
testcase_28 AC 70 ms
81,792 KB
testcase_29 AC 90 ms
85,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if N==1:
    print(A[0])
elif N==2:
    print(A[0]*A[1])
elif N%2==1:
    print(1)
else:
    A.sort()
    A = sorted(A[2:]+[A[0]*A[1]])
    print(A[0])
0