結果

問題 No.112 ややこしい鶴亀算
ユーザー ABKZABKZ
提出日時 2022-12-04 22:03:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 224 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 82,628 KB
実行使用メモリ 53,776 KB
最終ジャッジ日時 2024-04-20 04:12:30
合計ジャッジ時間 1,610 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,304 KB
testcase_01 AC 33 ms
52,544 KB
testcase_02 AC 32 ms
52,052 KB
testcase_03 AC 32 ms
52,432 KB
testcase_04 AC 31 ms
52,892 KB
testcase_05 AC 31 ms
52,488 KB
testcase_06 AC 32 ms
52,304 KB
testcase_07 AC 31 ms
52,480 KB
testcase_08 AC 32 ms
52,552 KB
testcase_09 AC 32 ms
51,748 KB
testcase_10 AC 31 ms
53,604 KB
testcase_11 AC 34 ms
53,440 KB
testcase_12 AC 32 ms
52,984 KB
testcase_13 AC 31 ms
52,004 KB
testcase_14 AC 30 ms
53,072 KB
testcase_15 AC 32 ms
53,776 KB
testcase_16 AC 31 ms
52,820 KB
testcase_17 AC 33 ms
53,352 KB
testcase_18 AC 32 ms
53,624 KB
testcase_19 AC 31 ms
52,960 KB
testcase_20 AC 32 ms
53,144 KB
testcase_21 AC 31 ms
52,240 KB
testcase_22 AC 33 ms
51,692 KB
testcase_23 AC 30 ms
52,136 KB
testcase_24 AC 33 ms
51,904 KB
権限があれば一括ダウンロードができます

ソースコード

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