結果

問題 No.112 ややこしい鶴亀算
ユーザー kutsutama
提出日時 2019-01-17 17:09:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-07-01 10:06:58
合計ジャッジ時間 1,668 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = set([int(x) for x in input().split()])

res = (0, 0)
if len(a) == 1:
    if (len(a) + 4) // 4 == n:
        res = (0, n)
    else:
        res = (n, 0)
else:
    leg = max(a) + 2
    turtle = leg // 2 - n
    res = (n - turtle, turtle)

print(*res)
0