+ 4

Challenge here!

Write an algorithm to split an integer Condition: Should not convert int to string Should not use directly split() methods. Ex: Input - > 23542 Output - > 2 3 5 4 2 ALL LANGUAGES ACCEPTED. Here is mine.. https://code.sololearn.com/cBj7Oq4hRZ18/?ref=app

30th Oct 2017, 7:16 PM
Omniscient
Omniscient - avatar
9 ответов
+ 11
Ok, I rethought this and it seems I have overdone this. Here's an amended version: https://code.sololearn.com/c6CsrGrv1lwu/?ref=app
30th Oct 2017, 9:21 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 9
https://code.sololearn.com/colXG17vlX5J/?ref=app
30th Oct 2017, 9:36 PM
Vukan
Vukan - avatar
+ 8
My take: (without math module, as I'd need math.log10 to be more efficient) https://code.sololearn.com/cNerBN17z032/?ref=app
30th Oct 2017, 7:50 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 7
Didn't do any str operations .. https://code.sololearn.com/Wj53fkUyQ2dF/?ref=app
30th Oct 2017, 8:19 PM
Kash
Kash - avatar
+ 3
@Gao XiangShuai Yep. Everything should be numerically done. No characters, no strings, only integers.
30th Oct 2017, 8:35 PM
Omniscient
Omniscient - avatar
+ 2
does converting the int to char array count as cheating? :D
30th Oct 2017, 8:33 PM
Gao Xiangshuai
Gao Xiangshuai - avatar
30th Oct 2017, 9:06 PM
Daniel
Daniel - avatar
+ 2
https://code.sololearn.com/cQm5pa4FxqJY
31st Oct 2017, 11:45 AM
Avinash Gupta
Avinash Gupta - avatar
1st Nov 2017, 10:15 AM
Daniel Bausá Llamazares
Daniel Bausá Llamazares - avatar