Make It Big!

You are given a number N (10 ≤ N ≤ 2×109). You have to perform exactly two swap operation. You can choose any two unequal position of this number and swap digit of this two position.


This is a companion discussion topic for the original entry at https://toph.co/p/make-it-big
1 Like

The test cases in this problem are not matching the problem statement. The problem specifies that each line will have an integer, but I kept getting RTE in Python. When I parsed the input, not accounting for different lines, it passes. I ended up switching to C++ to solve. Please check the test cases.

1 Like

Are the inputs for n space separated?

@utshab
The inputs are not space separated. They appears in different lines.

1 Like

Leading Zeros are allowed ?

I dont understand it clearly. It says it will contain at most 218 in every test case, but in sample it contain lerger than that??

I think it is 2^109 . They have mistyped .

Mine got accepted.
I thought –
T is a number in [1 , 10^3]
N is a number in [10 , 2 x 10^9]