結果

問題 No.731 等差数列がだいすき
コンテスト
ユーザー tktk_snsn
提出日時 2021-03-19 19:26:14
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 227 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 379 ms
コンパイル使用メモリ 14,592 KB
実行使用メモリ 37,964 KB
最終ジャッジ日時 2026-10-16 11:49:16
合計ジャッジ時間 11,894 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import numpy as np
n = int(input())
x = np.arange(n)
y = np.array(input().split(), dtype=np.intc)
(b, a), error, _, _, _ = np.polyfit(x, y, deg=1, full=True)
print("{:.12f} {:.12f}".format(a, b))
print("{:.12f}".format(*error))
0