結果

問題 No.112 ややこしい鶴亀算
ユーザー ABKZ
提出日時 2022-12-04 22:03:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 224 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 82,148 KB
実行使用メモリ 53,296 KB
最終ジャッジ日時 2024-10-11 23:08:15
合計ジャッジ時間 1,911 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

b = max(A)
c = len([x for x in A if x == b])

if N != c:
    print(f"{c} {N - c}")
else:
    if 2 * c == b + 2:
        print(f"{c} 0")
    else:
        print(f"0 {c}")
0