結果

問題 No.1816 MUL-DIV Game
ユーザー puznekopuzneko
提出日時 2022-02-04 00:55:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 18,924 KB
最終ジャッジ日時 2023-09-02 03:22:51
合計ジャッジ時間 3,454 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,228 KB
testcase_01 AC 15 ms
8,060 KB
testcase_02 AC 15 ms
8,180 KB
testcase_03 AC 15 ms
8,140 KB
testcase_04 AC 16 ms
8,184 KB
testcase_05 AC 16 ms
8,184 KB
testcase_06 AC 16 ms
8,128 KB
testcase_07 AC 15 ms
8,060 KB
testcase_08 AC 15 ms
8,060 KB
testcase_09 AC 17 ms
9,184 KB
testcase_10 AC 28 ms
12,892 KB
testcase_11 AC 26 ms
12,148 KB
testcase_12 AC 24 ms
11,216 KB
testcase_13 AC 45 ms
14,704 KB
testcase_14 AC 32 ms
11,732 KB
testcase_15 AC 37 ms
12,920 KB
testcase_16 AC 20 ms
9,180 KB
testcase_17 AC 56 ms
17,168 KB
testcase_18 AC 55 ms
16,392 KB
testcase_19 AC 34 ms
12,288 KB
testcase_20 AC 58 ms
17,364 KB
testcase_21 AC 29 ms
11,240 KB
testcase_22 AC 26 ms
10,604 KB
testcase_23 AC 15 ms
7,808 KB
testcase_24 AC 15 ms
7,812 KB
testcase_25 AC 65 ms
18,888 KB
testcase_26 AC 43 ms
18,856 KB
testcase_27 AC 66 ms
18,924 KB
testcase_28 AC 45 ms
18,804 KB
testcase_29 AC 65 ms
18,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
n, *a = map(int, stdin.read().split())

if n == 1:
    print("{}".format(a[0]))
    exit()
elif n == 2:
    print("{}".format(a[0]*a[1]))
    exit()
elif n % 2 == 1:
    print("{}".format(1))
    exit()

a.sort()
ans = min(a[0]*a[1],a[2])
print("{}".format(ans))
0