結果

問題 No.112 ややこしい鶴亀算
ユーザー zombietan
提出日時 2016-05-01 00:49:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 256 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-05 00:17:34
合計ジャッジ時間 1,373 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
tk = list(set(a))

if len(tk) == 1:
    if (n - 1)*2 == tk[0]:
        print(n, 0)
    elif (n - 1)*4 == tk[0]:
        print(0, n)
else:
    t = a.count(max(tk))
    k = a.count(min(tk))
    print(t, k)
0