結果

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

ソースコード

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 == 2:
			ans[0] += 1
		else:
			ans[1] += 1
else:
	if A[0] == (N - 1) * 2:
		ans[0] = N
	else:
		ans[1] = N
print(*ans)
0