A plus B large numbers

View as PDF

Submit solution

Points: 100.00
Time limit: 1.0s
Memory limit: 1G
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

Cho 2 số nguyên dương ~a~ và ~b~

Yêu cầu: Tính ~a+b~

Dữ liệu vào: Hai số ~a~ và ~b~ trên 2 dòng

Kết quả: Giá trị của ~a+b~

Chú ý: ~a, b~ là số rất lớn lên đến hàng triệu chữ số

Ví dụ:
Input 1:
3
9
Output 1:
12
Input 2:
12111222999090909090909090909090909090424234242235235235235
14141414104910491209401294019240930594545454545454324240909067686785
Output 2:
14141414117021714208492203110150021503636363635878558483144302922020

Comments

Please read the guidelines before commenting.



  • 0
    HuanHoaHoe  commented on April 30, 2023, 1:18 p.m.

    code py bili: print(int(input()) + int(input()))


  • -1
    anhtuan2007  commented on Sept. 16, 2022, 4:21 p.m.

    iloveame


  • 2
    quangtinh  commented on April 20, 2021, 8:41 a.m. edited

    Bài cho data thứ 5 rất lớn: khai báo động nếu dùng mảng ull (malloc với C/C++). Ai đúng 4/5 testcase rồi thì thử dữ liệu to hơn nhé!