結果

問題 No.112 ややこしい鶴亀算
ユーザー rlangevin
提出日時 2024-10-14 00:33:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 244 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 51,840 KB
最終ジャッジ日時 2024-10-14 00:33:51
合計ジャッジ時間 2,086 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
ans = [0, 0]
if len(set(A)) == 2:
	ma = max(A)
	for a in A:
		if ma - a == 0:
			ans[0] += 1
		else:
			ans[1] += 1
else:
	if A[0] == (N - 1) * 2:
		ans[0] = N
	else:
		ans[1] = N
print(*ans)
0