• + 0 comments

    I tried this : 1/ find a diviser to n (call it n1) then the original number 111...11 can be divided by n1, and the result is like n2=1000...1000...1 (number of zeros dpend on n1) then our original number 111...11 (n ones) = 11..1 (n1 ones)n2 Now 1000...1000....1 = 1000...1000...0 +1 1000...1000...0 can be divided by 1000... one can continue like this with some patterns to reduce the cost of % big numbers But it didn't run all test cases :/ time exceeded