結果
問題 | No.40 多項式の割り算 |
ユーザー | Yuta123456 |
提出日時 | 2020-05-21 17:55:06 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 687 bytes |
コンパイル時間 | 265 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-04-09 23:27:04 |
合計ジャッジ時間 | 21,645 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 384 ms
10,752 KB |
testcase_01 | AC | 386 ms
10,752 KB |
testcase_02 | AC | 401 ms
10,880 KB |
testcase_03 | AC | 372 ms
10,880 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 625 ms
10,752 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 204 ms
11,008 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | AC | 425 ms
11,008 KB |
testcase_22 | AC | 485 ms
10,880 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 417 ms
10,880 KB |
testcase_26 | AC | 410 ms
10,752 KB |
testcase_27 | AC | 359 ms
10,752 KB |
testcase_28 | AC | 388 ms
10,752 KB |
testcase_29 | AC | 413 ms
10,880 KB |
testcase_30 | AC | 425 ms
10,752 KB |
testcase_31 | AC | 438 ms
10,752 KB |
testcase_32 | AC | 356 ms
10,752 KB |
testcase_33 | AC | 374 ms
10,752 KB |
testcase_34 | AC | 440 ms
10,752 KB |
ソースコード
d = int(input()) array = list(map(int, input().split())) c = array[0] f_1 = sum(array) f_2 = 0 for i in range(d+1): if i % 2 == 0: f_2 += array[i] else: f_2 -= array[i] for a in range(-1000, 1000): for b in range(-1000,1000): if a+b+c == f_1 and a-b+c == f_2: d = 3 if a == 0: d -= 1 if b == 0: d -= 1 if c == 0: d -= 1 if d == 0: print(0) print(0) exit() print(d-1) for i in range(d): print([c,b,a][i], end=" ") exit()