GHÉP SỐ

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 512M
Input: stdin
Output: stdout

Problem type
Allowed languages
Python, Scratch

In case the statement didn't load correctly, you can download the statement here: Statement


Comments

Please read the guidelines before commenting.



  • 0
    truongphat   commented on Sept. 7, 2024, 8:49 a.m.

    sai mất 1 task =))


    • 1
      KVMB23A_67   commented on Sept. 9, 2024, 7:43 p.m.

      if strA[i] < strB[j]: chỗ này sửa thành if strA[i] <= strB[j]: nhé


  • 0
    truongphat   commented on Sept. 7, 2024, 8:46 a.m.

    dễ mà mn, cod python nhé:

    def mergenumbers(A, B): strA = str(A) strB = str(B) lenA = len(strA) lenB = len(str_B) i, j = 0, 0 result = []

    while i < len_A and j < len_B:
        if str_A[i] < str_B[j]:
            result.append(str_A[i])
            i += 1
        else:
            result.append(str_B[j])
            j += 1
    
    
    result.extend(str_A[i:])
    result.extend(str_B[j:])
    
    return int(''.join(result))
    

    A = int(input()) B = int(input()) print(merge_numbers(A, B))


  • 0
    kietjumper   commented on Aug. 22, 2024, 9:30 a.m.

    Ko co C++ :(((


  • 0
    baonhat17042014   commented on Aug. 15, 2024, 2:35 p.m.

    ai mà cần code thì nói mình nhé


    • 0
      truongphat   commented on Aug. 16, 2024, 8:52 p.m.

      cho mình xin code python


  • 0
    Minh2014   commented on Aug. 15, 2024, 8:08 a.m. edited

    ko cho xem đâu


  • 2
    thienthansanga2k13   commented on July 1, 2024, 5:12 p.m.

    mn có thể chỉ mik cách giải trên scratch được không ạ? mik cảm ơn


  • -3
    DucKien2014   commented on June 29, 2024, 4:17 p.m.

    PLS donate code


  • -3
    quan2013   commented on June 27, 2024, 8:40 p.m.

    a


  • -3
    THTA10146   commented on June 19, 2024, 12:52 p.m.

    phải xét thêm phàn tử đó + vói 1 nữa ròi mói full test


  • -3
    THTA10146   commented on June 19, 2024, 12:51 p.m.

    full test rồi


  • -4
    THTA10146   commented on June 19, 2024, 12:50 p.m.

    dễ thế


  • 0
    dtdungvnt   commented on June 8, 2024, 4:17 p.m.

    Test 6 là gì mà không qua nổi!


  • 4
    Camthao   commented on June 2, 2024, 4:12 p.m.

    😭😭😭!!! khó...


  • 0
    KPKTuan   commented on May 27, 2024, 12:35 p.m.

    Xét từng phần tử. Cái nào bé hơn thì cho vào một chuỗi. Nhớ bảo đảm rằng chữ đầu tiên != 0.


  • 6
    CODE_OFFICAL   commented on May 17, 2024, 11:33 a.m.

    bài này hay nè


  • 0
    Bongu   commented on May 6, 2024, 4:16 p.m.

    Không dễ đâu giaphuykhoa ạ


  • -5
    haidz118   commented on May 1, 2024, 7:43 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -5
    haidz118   commented on May 1, 2024, 5:36 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • 12
    Chiie   commented on May 1, 2024, 10:04 a.m.

    Làm như nào vậy mọi người ?


  • -22
    giaphuykhoa   commented on April 27, 2024, 1:05 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.