結果

問題 No.1816 MUL-DIV Game
ユーザー ygd.ygd.
提出日時 2022-01-21 21:45:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 878 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2023-08-17 05:30:09
合計ジャッジ時間 3,025 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,984 KB
testcase_01 AC 17 ms
8,020 KB
testcase_02 AC 16 ms
8,148 KB
testcase_03 AC 16 ms
7,984 KB
testcase_04 AC 16 ms
8,028 KB
testcase_05 AC 16 ms
7,944 KB
testcase_06 AC 16 ms
8,084 KB
testcase_07 AC 17 ms
7,996 KB
testcase_08 AC 16 ms
7,964 KB
testcase_09 AC 21 ms
9,176 KB
testcase_10 AC 39 ms
12,824 KB
testcase_11 AC 36 ms
12,256 KB
testcase_12 AC 31 ms
11,260 KB
testcase_13 AC 52 ms
14,672 KB
testcase_14 AC 35 ms
11,528 KB
testcase_15 AC 42 ms
12,912 KB
testcase_16 AC 22 ms
9,328 KB
testcase_17 AC 67 ms
17,264 KB
testcase_18 AC 63 ms
16,480 KB
testcase_19 AC 39 ms
12,216 KB
testcase_20 AC 68 ms
17,612 KB
testcase_21 AC 33 ms
11,316 KB
testcase_22 AC 29 ms
10,560 KB
testcase_23 AC 16 ms
8,028 KB
testcase_24 AC 17 ms
7,980 KB
testcase_25 AC 80 ms
19,328 KB
testcase_26 AC 70 ms
19,176 KB
testcase_27 AC 78 ms
19,264 KB
testcase_28 AC 69 ms
19,148 KB
testcase_29 AC 80 ms
19,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#input = sys.stdin.readline #文字列につけてはダメ
#input = sys.stdin.buffer.readline #文字列につけてはダメ
#sys.setrecursionlimit(1000000)
#import bisect
#import itertools
#import random
from heapq import heapify, heappop, heappush
#from collections import defaultdict 
#from collections import deque
#import copy
#import math
#from functools import lru_cache
#@lru_cache(maxsize=None)
#MOD = pow(10,9) + 7
#MOD = 998244353
#dx = [1,0,-1,0]
#dy = [0,1,0,-1]


def main():
    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:
        B = []
        B.append(A[0]*A[1])
        for i in range(2,N):
            B.append(A[i])
        B.sort()
        print(B[0])
    

if __name__ == '__main__':
    main()
0