Python's % operator uses the floor of a/da/da/d as the quotient, while Java's % operator truncates the quotient toward zero; both then return a−dqa - dqa−dq. For each pair of integers in the table, enter the value that each language returns for a % d. Enter each value as an integer.
Unlock full course notes by signing up
Consequences of a common divisor
Let aaa, bbb and ccc be integers with a≠0a \neq 0a=0, and suppose that a∣ba \mid ba∣b and a∣ca \mid ca∣c. Which of the following statements must be true for every such choice of aaa, bbb and ccc? Select all that apply.
Recovering a compact prime factorization
A programmer represents 756 using the form 756=2a3bp756=2^a3^bp756=2a3bp, where aaa and bbb are positive integers and p>3p>3p>3 is prime. Complete the representation: aaa is ________, bbb is ________, and ppp is ________.
Remainder of an expression from a known remainder
An integer xxx leaves remainder 8 when divided by 11 under the division algorithm, so x=11q+8x = 11q + 8x=11q+8 for some integer qqq. Find the remainder rrr, with 0≤r<110 \le r < 110≤r<11, when 4x−34x - 34x−3 is divided by 11. Give your answer as a whole number.
A square image that fits two block sizes
A graphics tool creates a square test image with a positive integer number of pixels along each edge. It must save the same image in either of two formats: one packs pixels into blocks of 72, and the other packs pixels into blocks of 120. Each format must use complete blocks, with no added pixels.
Find the smallest possible total pixel count and the corresponding side length. Enter both answers as exact integers: total count in pixels and side length in pixels.