F1. Nearest Beautiful Number (easy version)
It is a simplified version of problem F2. The difference between them is the constraints (F1:
You are given an integer
A number is called
The first line contains one integer
Each test case consists of one line containing two integers
For each test case output on a separate line
4 1 1 221 2 177890 2 998244353 1
1 221 181111 999999999
Post a Comment
0 Comments