+ 3
[CHALLENGE]đ Divide a number so that difference is minimum
đ Description: Input an integer n, and then divide it into two integers so that the difference is minimum between the two integers Input: 15 Output: 7 and 8 Input: 16 Output: 7 and 9 đ Note: The divided integers cannot be equal Good luck đ # Happy coding
7 Answers
+ 13
Using loop..
https://code.sololearn.com/c7Ufzx48j1k4/?ref=app
+ 6
My try in C++ :
https://code.sololearn.com/chOBJdaTku6q/#cpp
+ 4
https://code.sololearn.com/WQk8MJTCGuL5/?ref=app edit: I obfuscated the solution to not give it away.
+ 4
my starts in python.....&& trails .....
https://code.sololearn.com/cmc6pm7lx9fi/?ref=app
+ 3
https://code.sololearn.com/cT6T6C3RPuVN/?ref=app
+ 3