Sắp xếp 3 số

View as PDF



Authors:
Problem types
Points: 100 (p) Time limit: 1.0s Memory limit: 256M Input: stdin Output: stdout

Viết chương trình nhập vào ba số nguyên \(a,\ b,\ c\). In ra ba số đó theo thứ tự giảm dần.

Input

  • Ba số nguyên \(a, b, c\).

Output

  • In ra ba số đó theo thứ tự giảm dần

Example

Test 1

Input
2 
6 
3 
Output
6 3 2

Test 2

Input
-243 
-543 
-123 
Output
-123 -243 -543

Comments


  • 0
    TheBloxdPlayer    6:07 p.m. 11 nov, 2024


    • 0
      TrranThuaBach    5:57 p.m. 16 oct, 2024

      a=int(input())
      b=int(input())
      c=int(input())
      if a>b and a>c and b>c:
      print(a,b,c)
      elif a>b and a>c and c>b:
      print(a,c,b)
      elif b>a and b>c and a>c:
      print(b,a,c)
      elif b>a and b>c and c>a:
      print(b,c,a)
      elif c>a and c>b and a>b:
      print(c,a,b)
      elif c>a and c>b and b>a:
      print(c,b,a)


      • 0
        phuongdungkhth    2:42 p.m. 13 oct, 2024

        fhhfesuigyuyagvfrgrge


        • 0
          phuongdungkhth    2:42 p.m. 13 oct, 2024

          bài nài làm rồi


          • 0
            phuongdungkhth    2:41 p.m. 13 oct, 2024

            dễ lắm


            • 0
              khanhchi2504    4:11 p.m. 23 sep, 2024

              a =int(input())
              b =int(input())
              c =int(input())
              if(a>b):
              if(b>c):
              print(a,b,c)
              else:
              if(a>c):
              print(a,c,b)
              else:
              print(c,a,b)
              else:
              if(a>c):
              print(b,a,c)
              else:
              if(c>b):
              print(c,b,a)
              else:
              print(b,c,a)


              • -1
                pham_dung15    11:16 p.m. 21 aug, 2024

                khó
                vl


                • 0
                  phanlong37    9:52 p.m. 13 jul, 2024 edit 22

                  a = int(input())
                  b = int(input())
                  c = int(input())
                  A = [a,b,c]
                  B = [max(A),sum(A)-max(A)-min(A),min(A)]
                  print(list(B))


                  • 6
                    Avocadorable    5:34 p.m. 8 may, 2024
                    a = int(input())
                    b = int(input())
                    c = int(input())
                    
                    l = [a, b, c]
                    l.sort(reverse = True)
                    
                    for i in l:
                        print(i, end = " ")
                    

                    • 1
                      dxuloc    8:40 p.m. 22 dec, 2023 edited

                      khá ít :
                      a=int(input())
                      b=int(input())
                      c=int(input())
                      if a==b and a==c and b==c:
                      print(a)
                      print(a)
                      print(a)
                      if c>b>a:
                      print(c)
                      print(b)
                      print(a)
                      if c<b<a:
                      print(a)
                      print(b)
                      print(c)
                      if b<a\<c: print(c) print(a) print(b) if b>a>c:
                      print(b)
                      print(a)
                      print(c)
                      if a<c\<b: print(b) print(c) print(a) if a>c>b:
                      print(a)
                      print(c)
                      print(b)

                      3 replies
                      • 6 more comments