Rosetta Problems

現れている数字 (Appearing Numbers)

https://atcoder.jp/contests/joi2024yo1a/tasks/joi2024_yo1a_d