Submission #32277657


Source Code Expand

N, M = map(int, input().split())

X = 256

A = 0
Xⁿ = 1
for a in map(int, input().split()):
    A += a * Xⁿ
    Xⁿ *= X

C = 0
Xⁿ = 1
for c in map(int, input().split()):
    C += c * Xⁿ
    Xⁿ *= X

B = C // A
b = []
while B != 0:
    x = B % X
    if x > 100:
        x -= X
    b.append(x)
    B = (B - x) // X

print(*b)

Submission Info

Submission Time
Task D - Polynomial division
User MMNMM
Language Python (3.8.2)
Score 400
Code Size 336 Byte
Status AC
Exec Time 28 ms
Memory 9288 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 2
AC × 20
Set Name Test Cases
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt
Case Name Status Exec Time Memory
example_00.txt AC 18 ms 9284 KiB
example_01.txt AC 17 ms 9284 KiB
hand_00.txt AC 17 ms 9192 KiB
hand_01.txt AC 22 ms 9044 KiB
hand_02.txt AC 19 ms 9140 KiB
hand_03.txt AC 22 ms 9196 KiB
hand_04.txt AC 18 ms 9052 KiB
hand_05.txt AC 19 ms 9044 KiB
random_00.txt AC 20 ms 9048 KiB
random_01.txt AC 17 ms 9044 KiB
random_02.txt AC 22 ms 9128 KiB
random_03.txt AC 28 ms 9152 KiB
random_04.txt AC 20 ms 9200 KiB
random_05.txt AC 23 ms 9260 KiB
random_06.txt AC 17 ms 9268 KiB
random_07.txt AC 17 ms 9140 KiB
random_08.txt AC 19 ms 9288 KiB
random_09.txt AC 18 ms 9196 KiB
random_10.txt AC 19 ms 9048 KiB
random_11.txt AC 17 ms 9140 KiB