-CHALLENGE- Flip The number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

-CHALLENGE- Flip The number

I recommend to use C++/Java/C/Pascal. There are 2 input First is for the data, second is for the number. Example Input #1 : 3 28479542 Output : 2 4 8 2 5 9 4 7 Example Input #2: 6 2983479830472346 The Output Is: 0 4 8 2 4 8 2 4 9 3 6 9 3 7 3 7 Good luck.

25th Nov 2017, 10:10 AM
Momo Belia
Momo Belia - avatar
7 Answers
+ 1
heres mine enter the data...only u can change the number in code//// https://code.sololearn.com/cLJ7Zsk0gPCz/?ref=app
25th Nov 2017, 3:18 PM
sayan chandra
sayan chandra - avatar
+ 2
WOW SUCH A HIGH IQ!
25th Nov 2017, 3:21 PM
Momo Belia
Momo Belia - avatar
+ 1
output: 1 6 2 7 3 8 4 9 5 other samples 3 1122334455 output 1 2 4 5 1 3 4 2 3 5
25th Nov 2017, 2:07 PM
Momo Belia
Momo Belia - avatar
0
Reminder for who wanna get in this challenge : if you don't understand the question, you can give me the sample, I'll tell you the output the number is not always sorted.
25th Nov 2017, 1:46 PM
Momo Belia
Momo Belia - avatar
0
5 123456789
25th Nov 2017, 2:06 PM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
0
@Darius According to the reports on my examples, I realized that the first number is the step with which you have to choose the numbers. But your examples #1 and #2 do not correspond to this rule.
25th Nov 2017, 8:15 PM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
0
example 1 and 2 is follow the rules, the number is now always sorted, the output will be generate from small to big number
26th Nov 2017, 12:41 AM
Momo Belia
Momo Belia - avatar