結果

問題 No.1816 MUL-DIV Game
ユーザー se1ka2
提出日時 2022-01-21 21:26:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 650 ms
コンパイル使用メモリ 69,248 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-25 22:37:26
合計ジャッジ時間 2,087 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;

int main()
{
	int n;
	cin >> n;
	ll a[100005];
	for(int i = 0; i < n; i++) cin >> a[i];
	sort(a, a + n);
	if(n == 1) cout << a[0] << endl;
	else if(n == 2) cout << a[0] * a[1] << endl;
	else if(n % 2) cout << 1 << endl;
	else cout << a[n / 2] << endl;
}
0