## A cộng B

View as PDF

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ử "+".

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

easy

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

ghuy4g k76 Hóa 1 THPT chuyên nguyễn huệ hà nội sẽ nhất VOI 25

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

Khánh Nguyên cute

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

*code c++ ngắn gọn,đơn giản đảm bảo AC * #include <bits/stdc++.h> using namespace std; int a,b; int main(){ cin>>a>>b; cout<<(a+b); return 0; } ai là wibu giơ tay

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

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

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

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

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

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

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

oke

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

+1 downvote

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

Cách giải:

cin >> a >> b;
sum = a + b;
cout << a + b;

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

its so hard for me!!!!!!!!!!!!!!!!

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

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

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

t t t, t hỏi nên npqhungtq2023 trả lời

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

mình hỏi, sao bạn?

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

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

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

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

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

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

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

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

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

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

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

bài này các bạn có thể optimize bằng Convex Hull Trick như sau: ta có nhận xét là kết quả của ta sẽ là 1 đt có dạng y = ax+b, nhiệm vụ là tính y tại x = 1, do đó các bạn push đt (a, b) lên cht và get như bth

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

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

• commented on Dec. 13, 2023, 2:29 a.m.

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

• commented on Dec. 13, 2023, 2:29 a.m.

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

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

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

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

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

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

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

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

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

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

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

• commented on Oct. 20, 2023, 8:26 a.m.

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

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

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

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

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

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

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

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

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

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

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

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

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

• commented on Oct. 12, 2023, 6:30 a.m.

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

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

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

• commented on Oct. 12, 2023, 6:09 a.m.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

• commented on May 3, 2023, 12:44 p.m.

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

• commented on May 3, 2023, 12:40 p.m. edit 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

• commented on March 17, 2023, 1:37 p.m.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Bài này cho 2 số A và B trên cùng một dòng. Hàm input() thì đọc hết nguyên một dòng luôn.

Bạn có thể đọc input như sau:

a, b = map(int, input().split())

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

xin 1 upvote

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

• 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; }

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

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

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

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

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

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

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

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