Comparing Digit Frequencies

Write a function compare_digits(p, q) that tells whether every digit
(non-negative integer less than 10) of p occurs in q at least as often
as it occurs in p. Borh p and q are positive integers.

Observation

Consider using as auxiliary function your (correct!) solution to X40706.

Problem information

Author: Jordi Delgado &amp; José Luis Balcázar

Generation: 2026-01-25T17:25:03.006Z

© Jutge.org, 2006–2026.
https://jutge.org
