A cộng B

View as PDF

Submit solution


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

Problem source:
Just to test
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

Cho ~2~ số nguyên ~A~ và ~B~. Hãy tính ~A + B~.

Input

Gồm ~1~ dòng chứa ~2~ số nguyên ~A~ và ~B~ ~(1 \le A, B \le 1000)~, cách bởi ~1~ dấu cách.

Output

Ghi ra tổng ~A + B~.

Sample Input

3 4

Sample Output

7

Note

Gợi ý: Sử dụng toán tử "+".


Comments

Please read the guidelines before commenting.



  • -5
    tranhoang1111  commented on Feb. 13, 2025, 3:43 a.m.

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


  • 6
    chaudepzai0410  commented on Jan. 18, 2025, 2:28 a.m.

    bài này phải giải bằng thuật toán đệ quy có nhớ, nhân ấn độ, lũy thừa nhị phân, quy hoạch động, dfs/bfs, eulertour, stack, nhân ma trận, kmp, hashing, segment tree, quick sort, BIT, chặt nhị phân, tarjan, LCA, bảng thưa, siêu cấp tổ hợp toán học, tourist


  • -4
    chaudepzai0410  commented on Jan. 18, 2025, 2:25 a.m.

    gspvh <3 gen


  • -4
    chaudepzai0410  commented on Jan. 18, 2025, 2:24 a.m.

    gspvh kh cuti


  • -6
    chaudepzai0410  commented on Jan. 18, 2025, 2:24 a.m.

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


  • -4
    chaudepzai0410  commented on Jan. 18, 2025, 2:24 a.m. edited

    xl moi nguoi minh bi troll :(


  • 2
    quan_mather  commented on Jan. 16, 2025, 1:58 p.m.

    Mình cảm thấy khá khó chịu khi đọc vào phần bình luận của bài này các bạn sao cứ spam ấy nhỉ,và cũng đã có nhiều bài bị spam bình luận giống vậy ,hãy xây dựng một cộng đồng VNOI có văn hoá chứ đừng có như vậy.Xin cảm ơn(mình chỉ là coder thôi)


  • -3
    pthtuong29  commented on Jan. 13, 2025, 1:01 p.m.

    Thấy bài dễ mà nhiều ông vào chỉ v :))


  • -2
    AnonymousExe  commented on Jan. 9, 2025, 11:51 a.m.

    Bài A + B làm thế này

    Sử dụng toán tử +

    Kết quả sẽ là A + B

    Thế là xong bài


  • 0
    ducquoc  commented on Dec. 30, 2024, 2:42 a.m. edit 6

    Template Java input + output đơn giản có unit test (driver class):

    https://oj.vnoi.info/src/8022650

    import java.io.*; import java.util.*;
    
    @SuppressWarnings({"all"}) // https://oj.vnoi.info/problem/post
    class VoDriverPost {
        public static void readInputAndPrintOutput(PrintStream out) {
            Scanner in = new Scanner(System.in); //https://gist.github.com/ducquoc/febef09c34dbaf2ab302b6330b407ef9
            int A = in.nextInt(); int B = in.nextInt(); int rs = A + B;
            out.println(rs); //out.close(); in.close();
        }
    
        final public static void main(String[] args) throws Exception {
            System.setIn(new ByteArrayInputStream("3 4\n".getBytes()));
            readInputAndPrintOutput(System.out);
        }
    }
    

  • -6
    Dinh_Phuc_Minh  commented on Dec. 26, 2024, 2:40 p.m.

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


  • -8
    tink29lenhuttri32  commented on Dec. 16, 2024, 9:32 a.m.

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


  • -7
    tink29lenhuttri32  commented on Dec. 16, 2024, 9:32 a.m.

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


  • -10
    tink29lenhuttri32  commented on Dec. 16, 2024, 9:32 a.m.

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


  • -7
    tink29lenhuttri32  commented on Dec. 3, 2024, 2:08 a.m.

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


  • -8
    tink29lenhuttri32  commented on Dec. 3, 2024, 2:07 a.m.

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


  • -1
    tink29levukhanhminh18  commented on Dec. 3, 2024, 2:02 a.m. edited

    .


  • -12
    K30thanhson  commented on Nov. 27, 2024, 3:12 a.m.

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


  • -14
    K30thanhson  commented on Nov. 27, 2024, 3:07 a.m.

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


  • -12
    K30thanhson  commented on Nov. 27, 2024, 3:07 a.m.

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


  • -14
    K30thanhson  commented on Nov. 27, 2024, 3:07 a.m.

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


  • -6
    nguyennhan70117  commented on Nov. 25, 2024, 12:37 p.m.

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


  • -14
    K30thanhson  commented on Nov. 18, 2024, 8:44 a.m. edit 2

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


  • -8
    danglebinhnguyen2014  commented on Nov. 4, 2024, 1:16 p.m.

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


  • -5
    khiemgia1105  commented on Oct. 4, 2024, 7:47 a.m.

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


  • -13
    K30thanhson  commented on Sept. 16, 2024, 3:20 a.m.

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


  • -12
    hoanglongnguyen9002  commented on Aug. 30, 2024, 3:03 a.m.

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


    • 2
      ducquoc  commented on Jan. 1, 2025, 5:01 a.m. edit 5

      Bài này chủ yếu để làm quen input, output, và run/submit với constraint thời gian thôi bạn.

      Không phải ai cũng rành C++. Vẫn có Java, Python, Go, C, JavaScript, C#, Kotlin, Dart, Delphi(Pascal), TypeScript, Rust, Elixir,... nên có bài này để chuẩn bị inout và compile/run/test là rất hữu ích.

      (Về phía server, cũng tiết kiệm tài nguyên và giảm tỷ lệ nộp sai khi beginners submit các bài actual practice)

      Tương tự SPOJ cũng có bài làm quen: https://www.spoj.com/problems/TEST , https://www.spoj.com/problems/J4FUN/

      https://luyencode.net/problem/cb02 https://ctoj.net/problem/PA0004 https://lqdoj.edu.vn/problem/w01

      https://lequydon.ntucoder.net/Problem/Details/1

      https://tek4.vn/luyen-tap/1000-bai-tap-lap-trinh-c/post3-ai-cong-nhanh-nhat

      http://csloj.ddns.net/problem/1

      (CodeChef cũng có problems/TEST và problems/INTEST giống SPOJ)


    • 8
      tronglee  commented on Sept. 12, 2024, 7:41 a.m.

      đâu phải ai cũng làm được


  • -9
    Crabrian  commented on Aug. 15, 2024, 7:45 a.m.

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


  • -13
    khanhlani  commented on Aug. 1, 2024, 2:28 a.m.

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


  • -12
    yae_miko  commented on July 11, 2024, 8:22 a.m.

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


  • -15
    hohoanghai5042011  commented on June 11, 2024, 2:45 p.m.

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


  • -15
    vantam  commented on May 9, 2024, 12:50 a.m.

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


    • -13
      gnortpv  commented on Aug. 10, 2024, 5:16 p.m.

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


    • -11
      nguyenhongnam207  commented on Aug. 10, 2024, 5:15 p.m.

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


      • -10
        An212  commented on Aug. 16, 2024, 1:22 p.m.

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


  • -13
    npqhungtq2023  commented on March 20, 2024, 10:08 a.m.

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


    • -11
      calong3003  commented on May 20, 2024, 9:47 a.m.

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


    • -32
      khoihk20  commented on March 20, 2024, 2:27 p.m.

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


      • -7
        random_idiot  commented on May 10, 2024, 1:46 p.m.

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


      • -5
        VVUU  commented on March 20, 2024, 2:28 p.m.

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


    • -9
      nictysine1  commented on March 20, 2024, 10:10 a.m.

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


  • -16
    tonblan  commented on March 17, 2024, 6:16 p.m.

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


  • -10
    nhl08contact  commented on Feb. 17, 2024, 6:19 a.m.

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


  • -14
    apotocaplyse  commented on Jan. 23, 2024, 7:38 a.m.

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


  • -26
    quanglm  commented on Jan. 1, 2024, 2:24 p.m.

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


  • -9
    Cadoc  commented on Dec. 29, 2023, 2:08 p.m.

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


  • -25
    tink29lenhuttri32  commented on Dec. 29, 2023, 2:27 a.m.

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


  • -17
    modwwe  commented on Dec. 13, 2023, 2:29 a.m. edited

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


  • -15
    modwwe  commented on Dec. 13, 2023, 2:29 a.m. edited

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


  • -19
    triclone_3  commented on Dec. 10, 2023, 10:53 a.m.

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


  • -21
    triclone_3  commented on Dec. 10, 2023, 10:52 a.m.

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


  • -14
    playerno1  commented on Dec. 3, 2023, 1:59 p.m.

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


  • -20
    tronghuy  commented on Nov. 30, 2023, 12:58 a.m.

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


  • -18
    tink29lenhuttri32  commented on Nov. 3, 2023, 1:28 a.m.

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


  • -24
    themluachon2008  commented on Oct. 20, 2023, 8:26 a.m. edited

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


  • -24
    Ich_bin_Khang  commented on Oct. 12, 2023, 8:00 a.m.

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


  • -18
    Ich_bin_Khang  commented on Oct. 12, 2023, 8:00 a.m.

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


  • -22
    Ich_bin_Khang  commented on Oct. 12, 2023, 8:00 a.m.

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


  • -20
    Ich_bin_Khang  commented on Oct. 12, 2023, 8:00 a.m.

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


  • -19
    Ich_bin_Khang  commented on Oct. 12, 2023, 8:00 a.m.

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


  • -17
    nhan19042007  commented on Oct. 12, 2023, 6:52 a.m.

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


  • -19
    phat141207  commented on Oct. 12, 2023, 6:30 a.m. edited

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


    • -16
      nhan19042007  commented on Oct. 12, 2023, 6:34 a.m.

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


  • -20
    monke_bi_bai_nao  commented on Oct. 12, 2023, 6:09 a.m. edited

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


  • -19
    lkva2019  commented on Oct. 9, 2023, 2:03 a.m.

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


  • -23
    Marr_HH  commented on Oct. 9, 2023, 1:57 a.m.

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


  • -16
    bruhlmao21  commented on Sept. 29, 2023, 3:00 p.m.

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


  • -14
    Ngumaconsi  commented on Sept. 29, 2023, 2:26 a.m.

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


  • -27
    khoihk20  commented on Sept. 24, 2023, 2:21 p.m.

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


  • -13
    _DURABLE_  commented on Sept. 22, 2023, 3:42 a.m.

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


    • -10
      tatech28  commented on Sept. 22, 2023, 3:42 a.m.

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


  • -24
    tink29phu23  commented on Sept. 18, 2023, 3:12 a.m.

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


  • -15
    tink29lenhuttri32  commented on Sept. 14, 2023, 2:47 a.m.

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


  • -12
    phamducminh538  commented on Aug. 1, 2023, 5:19 p.m.

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


  • -20
    Xcode  commented on July 31, 2023, 9:34 a.m.

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


  • -16
    l1i3nh  commented on May 3, 2023, 12:44 p.m. edited

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


  • -13
    l1i3nh  commented on May 3, 2023, 12:40 p.m. edit 3

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


  • -38
    khoihk20  commented on April 21, 2023, 1:05 a.m.

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


    • -21
      z  commented on April 21, 2023, 10:44 a.m.

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


    • -17
      tminh_hk20  commented on April 21, 2023, 1:06 a.m.

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


      • -19
        khoihk20  commented on April 21, 2023, 1:07 a.m.

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


    • -14
      nthach1010  commented on April 21, 2023, 1:06 a.m.

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


      • -18
        khoihk20  commented on April 21, 2023, 1:07 a.m.

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


  • -28
    nthquan_1505  commented on March 30, 2023, 4:22 a.m.

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


  • -17
    L2_2023_22_PhanHuuTai  commented on March 28, 2023, 5:37 a.m.

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


  • -23
    vuhoangphuc  commented on March 17, 2023, 1:37 p.m. edited

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


    • -23
      AnhPham  commented on March 17, 2023, 1:40 p.m.

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


  • -16
    k64_sorryimloser  commented on Feb. 11, 2023, 8:01 a.m.

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


  • -26
    neptune_170_nt  commented on Jan. 21, 2023, 2:36 a.m. edit 2

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


  • -38
    NTC  commented on Dec. 28, 2022, 3:41 a.m.

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


  • -33
    HUYLAMNOPRO1  commented on Dec. 26, 2022, 12:28 a.m. edited

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


  • -34
    HUYLAMNOPRO1  commented on Dec. 25, 2022, 1:57 a.m.

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


  • -27
    bautroidaysao  commented on Sept. 20, 2022, 3:19 p.m.

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


    • -6
      jalsol  commented on Sept. 22, 2022, 10:29 a.m.

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


  • 3
    NDAnhTuanKhongCopCode  commented on Aug. 8, 2022, 12:17 p.m.

    xin 1 upvote


    • -32
      hh123123  commented on Aug. 8, 2022, 3:17 p.m.

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


  • -31
    avatarstar1133  commented on July 29, 2022, 10:11 a.m.

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


    • -13
      nictysine1  commented on March 15, 2023, 2:19 p.m.

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


  • -32
    trantungduong  commented on June 10, 2022, 9:28 a.m.

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


  • -23
    QioCass  commented on June 9, 2022, 2:09 a.m. edit 2

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


  • -41
    caubechepcode  commented on Feb. 9, 2022, 8:38 a.m.

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


    • -23
      Minhquank25Clqd  commented on Sept. 6, 2022, 1:54 p.m.

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


  • -42
    nictysine1  commented on Feb. 8, 2022, 7:34 a.m.

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


    • -37
      ntkiet  commented on June 7, 2022, 2:24 p.m.

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


      • -37
        nictysine1  commented on July 17, 2022, 9:29 a.m.

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


  • -48
    AnNoProo  commented on Dec. 30, 2021, 7:27 a.m.

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


  • -33
    K24NVNTin  commented on Nov. 16, 2021, 8:57 a.m.

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


  • -40
    K24LAQUAN  commented on Nov. 16, 2021, 8:57 a.m.

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


  • -40
    mronjudge  commented on Oct. 30, 2021, 3:40 a.m.

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


  • -7
    darkkcyan  commented on Sept. 8, 2021, 9:35 a.m.

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


    • -20
      jalsol  commented on Sept. 9, 2021, 9:33 a.m.

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


    • -50
      SPyofgame  commented on Sept. 8, 2021, 9:37 a.m.

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


  • -62
    SPyofgame  commented on Sept. 8, 2021, 9:29 a.m.

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


    • -25
      ntkiet  commented on June 7, 2022, 2:23 p.m.

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


    • -29
      someone  commented on Sept. 9, 2021, 1:43 p.m.

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


    • -12
      pichu  commented on Sept. 8, 2021, 9:36 a.m.

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


      • -50
        SPyofgame  commented on Sept. 8, 2021, 9:37 a.m.

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


  • 7
    caubecanlao  commented on Aug. 5, 2021, 3:19 a.m.

    công thức quy hoạch động khá đơn giản

    include <bits/stdc++.h>

    using namespace std; const int N = 1e3 + 1e2; int dp[N][N]; int main() { cin.tie(0)->syncwithstdio(0); dp[1][0] = 1; dp[0][1] = 1; for (int i = 1; i <= 1000; i++) { for (int j = 1; j <= 1000; j++) { dp[i][j] = max({dp[i - 1][j] - (-1), dp[i][j - 1] - (-1), dp[i - 1][j - 1] - (-2)}); } } int a, b; cin >> a >> b; cout << max(dp[a][b], dp[b][a]); return 0; }


    • -13
      cpptowin  commented on Dec. 21, 2022, 8:50 a.m. edited

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


      • -19
        KeiKaruizawa  commented on Dec. 21, 2022, 3:10 p.m.

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


    • -30
      HN_CSP_FTRs  commented on Jan. 8, 2022, 1:05 p.m.

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


    • -47
      nguyenvana123  commented on Aug. 5, 2021, 3:21 a.m.

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