結果

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

ソースコード

diff #

# No.112 ややこしい鶴亀算
N = int(input())
a = [int(i) for i in input().split()]

if max(a) == min(a):
    print('{0} {1}'.format(0, N) if a[0] == 4 * (N - 1) else '{0} {1}'.format(N, 0))
else:
    print('{0} {1}'.format(a.count(max(a)), N - a.count(max(a))))
0