Comparing Digit Frequencies

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

Observation

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

Problem information

Author: Jordi Delgado & José Luis Balcázar

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

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