結果

問題 No.112 ややこしい鶴亀算
ユーザー dangodango
提出日時 2023-06-05 21:46:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 234 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 29,880 KB
最終ジャッジ日時 2023-08-28 09:44:34
合計ジャッジ時間 5,195 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
29,740 KB
testcase_01 AC 124 ms
29,776 KB
testcase_02 AC 128 ms
29,696 KB
testcase_03 AC 131 ms
29,732 KB
testcase_04 AC 129 ms
29,772 KB
testcase_05 AC 127 ms
29,788 KB
testcase_06 AC 127 ms
29,740 KB
testcase_07 AC 126 ms
29,760 KB
testcase_08 AC 124 ms
29,796 KB
testcase_09 AC 128 ms
29,752 KB
testcase_10 AC 128 ms
29,692 KB
testcase_11 AC 128 ms
29,768 KB
testcase_12 AC 127 ms
29,692 KB
testcase_13 AC 128 ms
29,664 KB
testcase_14 AC 130 ms
29,708 KB
testcase_15 AC 129 ms
29,672 KB
testcase_16 AC 129 ms
29,692 KB
testcase_17 AC 130 ms
29,776 KB
testcase_18 AC 128 ms
29,788 KB
testcase_19 AC 128 ms
29,736 KB
testcase_20 AC 130 ms
29,648 KB
testcase_21 AC 127 ms
29,880 KB
testcase_22 AC 130 ms
29,640 KB
testcase_23 AC 129 ms
29,828 KB
testcase_24 AC 132 ms
29,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy.linalg import solve
N = int(input())
A = input().split()
a = 0
for i in A:
    a += int(i)
num = a / (N - 1)
left = [[1, 1], [2, 4]]
right = [N, num]
X = solve(left, right)[0]
Y = solve(left, right)[1]
print(int(X), int(Y))
0