結果

問題 No.731 等差数列がだいすき
ユーザー H3PO4H3PO4
提出日時 2020-12-21 08:47:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,311 ms / 1,500 ms
コード長 188 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 11,668 KB
実行使用メモリ 74,396 KB
最終ジャッジ日時 2023-10-21 11:28:55
合計ジャッジ時間 15,037 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,311 ms
45,848 KB
testcase_01 AC 489 ms
45,908 KB
testcase_02 AC 489 ms
45,908 KB
testcase_03 AC 491 ms
45,904 KB
testcase_04 AC 498 ms
45,904 KB
testcase_05 AC 482 ms
45,904 KB
testcase_06 AC 490 ms
45,904 KB
testcase_07 AC 477 ms
45,904 KB
testcase_08 AC 478 ms
45,904 KB
testcase_09 AC 479 ms
45,904 KB
testcase_10 AC 491 ms
45,904 KB
testcase_11 AC 485 ms
45,912 KB
testcase_12 AC 479 ms
45,904 KB
testcase_13 AC 484 ms
45,904 KB
testcase_14 AC 477 ms
45,904 KB
testcase_15 AC 474 ms
45,904 KB
testcase_16 AC 485 ms
45,904 KB
testcase_17 AC 479 ms
45,904 KB
testcase_18 AC 484 ms
45,904 KB
testcase_19 AC 485 ms
45,904 KB
testcase_20 AC 490 ms
74,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
X = np.arange(N)
A = np.array(tuple(map(int, input().split())))

res = np.polyfit(X, A, 1, full=True)
d, b = res[0]
c = res[1][0]
print(b, d)
print(c)
0