cf/mirror

Nearest Beautiful Number (easy version)

CF
1560F11900· candidate master1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
1 1
221 2
177890 2
998244353 1
Output
1
221
181111
999999999
1560F1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…