結果

問題 No.112 ややこしい鶴亀算
コンテスト
ユーザー (ΦωΦ)
提出日時 2015-04-16 00:20:33
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 371 bytes
記録
コンパイル時間 116 ms
コンパイル使用メモリ 77,624 KB
最終ジャッジ日時 2025-12-03 14:39:33
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/python
from collections import Counter

N = int(raw_input())
a = map(int, raw_input().split())
counter = Counter(a)
if len(counter) == 1:
    all_tsuru = a[0] / (N-1) == 2
    tsuru, kame = (N, 0) if all_tsuru else (0, N)
    print '{} {}'.format(tsuru, kame)
    exit(0)
kame, tsuru = sorted(counter.keys())
print '{} {}'.format(counter[tsuru], counter[kame])
0