Editorial for Sắp xếp 2 số


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

Authors: SPyofgame


Spoiler Alert


Approach 1

  • In ra số bé hơn rồi in ra số lớn hơn

Approach 2

  • Nếu số đầu lớn hơn thì đảo giá trị hai số, rồi in ra số đầu -> số cuối


Comments (2)

Most recent
Loading comments...