結果
問題 | No.3002 多項式の割り算 〜easy〜 |
ユーザー |
![]() |
提出日時 | 2025-01-17 21:26:30 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 847 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 81,764 KB |
実行使用メモリ | 68,732 KB |
最終ジャッジ日時 | 2025-01-17 21:26:36 |
合計ジャッジ時間 | 2,473 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 RE * 1 |
ソースコード
from collections import defaultdict, deque, Counter# from functools import cache# import copyfrom itertools import combinations, permutations, product, accumulate, groupby, chain# from more_itertools import distinct_permutationsfrom heapq import heapify, heappop, heappush, heappushpopimport mathimport bisect# from pprint import pprintfrom random import randint, shuffle, randrange# from sortedcontainers import SortedSet, SortedList, SortedDictimport sys# sys.setrecursionlimit(2000000)input = lambda: sys.stdin.readline().rstrip('\n')inf = float('inf')mod1 = 10**9+7mod2 = 998244353def ceil_div(x, y): return -(-x//y)#################################################A, B = map(int, input().split())dp = [0]*(B+1)dp[B] = Afor i in range(B-2, -1, -1):c = dp[i+2]dp[i+1] -= cdp[i] -= cprint(dp[1], dp[0])