結果

問題 No.1816 MUL-DIV Game
ユーザー Hydru
提出日時 2022-01-21 21:27:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 87,624 KB
最終ジャッジ日時 2024-11-25 22:39:06
合計ジャッジ時間 3,195 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
A=list(map(int,input().split()))
A.sort(reverse=True)
ans=A[0]
flag=0
for x in A[1:]:
    if flag==0:
        ans*=x
    else:
        if x>ans:
            ans=-(-ans//x)
        else:
            ans=x//ans
    flag=1-flag
print(ans)
0