結果

問題 No.112 ややこしい鶴亀算
ユーザー y_nakamura_CC2
提出日時 2017-04-21 01:09:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 266 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-07-20 01:08:41
合計ジャッジ時間 1,987 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = list(map(int, input().split()))

#最大値から合計を引き、それを2で割ることで鶴の数を求める
sum = sum(L) / (N-1)
max = N * 4

crane = int((max - sum) / 2)

turtle = int(N - crane)

print(str(crane) + " " + str(turtle))
0