Machine SOLUTIONS SC_05 CODECHEF
Charlie found a machine while on investigation. He carried the machine to you however you understand that first you have to open the machine with a progression of steps. Fortunately, Charlie had additionally discovered a paper containing arrangement of numbers to open the machine in T steps. Each progression requires an information K to continue. In any case, sadly, the key of digit 7 is broken.
You additionally discover that rather than a solitary information, you can give two contributions for each progression with the end goal that the outcome includes upto K. Since the key 7 is broken, you continue with the alternative of separating the number into two sections so you can abstain from entering the digit 7.
Your main responsibility is to compose a program which will break K into two sections an and b with the end goal that K=a+b and neither of an or b has digit 7.
Model: K=3576 can be broken into a=1633 and b=1943
First line will contain T, number of steps. At that point the means follow.
Each progression contains of a solitary line of information, a whole number K.
For each testcase, yield in a solitary line an and b isolated by space. In the event that there are various right answers print any.
It is ensured that every K will have in any event one digit as 7.
The complete imprints will be separated into:
5% : 1≤K≤105
10% : 1≤K≤1010
15% : 1≤K≤1020
25% : 1≤K≤1050
45% : 1≤K≤10100
For each progression, yield an and b wholes upto K and don’t contain digit 7 :
There could be different answers, all answers which result in K=a+b and where an and b don’t contain a digit 7 will be acknowledged.