結果

問題 No.1816 MUL-DIV Game
ユーザー ShirotsumeShirotsume
提出日時 2022-01-21 22:20:50
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 91,328 KB
最終ジャッジ日時 2023-08-17 06:31:22
合計ジャッジ時間 4,660 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,412 KB
testcase_01 AC 72 ms
71,152 KB
testcase_02 AC 70 ms
71,636 KB
testcase_03 AC 69 ms
71,384 KB
testcase_04 AC 72 ms
71,292 KB
testcase_05 AC 71 ms
71,308 KB
testcase_06 AC 70 ms
71,288 KB
testcase_07 AC 72 ms
71,420 KB
testcase_08 AC 70 ms
71,292 KB
testcase_09 AC 74 ms
75,876 KB
testcase_10 AC 88 ms
81,180 KB
testcase_11 AC 86 ms
80,260 KB
testcase_12 AC 84 ms
78,684 KB
testcase_13 AC 96 ms
84,264 KB
testcase_14 AC 85 ms
79,288 KB
testcase_15 AC 88 ms
81,144 KB
testcase_16 AC 75 ms
75,704 KB
testcase_17 AC 104 ms
88,928 KB
testcase_18 AC 102 ms
87,560 KB
testcase_19 AC 86 ms
80,272 KB
testcase_20 AC 106 ms
89,152 KB
testcase_21 AC 83 ms
78,668 KB
testcase_22 AC 80 ms
77,524 KB
testcase_23 AC 71 ms
71,600 KB
testcase_24 AC 70 ms
71,228 KB
testcase_25 AC 110 ms
91,264 KB
testcase_26 AC 109 ms
91,292 KB
testcase_27 AC 109 ms
91,328 KB
testcase_28 AC 108 ms
91,328 KB
testcase_29 AC 112 ms
91,324 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:
    now = a[0] * a[1]
    del a[0]
    del a[0]
    a.append(now)
    a.sort()
    print(a[0])
        
0