[Làm Quen OJ]. Bài 12. Hàm F(x, y)

View as PDF

Submit solution

Points: 1.00 (partial)
Time limit: 1.0s
Memory limit: 256M
Input: stdin
Output: stdout

Problem source:
28Tech
Problem type
Allowed languages
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch

Cho F(x, y) = 5 * x + 2 * y + x * y, với x, y được nhập từ bàn phím hãy in ra kết quả của F(x, y).

Mỗi khi tính toán kết quả phải chú ý tới giới hạn của bài toán, để xác định xem kết quả của bài toán sẽ nằm tới ngưỡng nào để lựa chọn kiểu dữ liệu cho phù hợp.


Đầu vào

Dòng duy nhất chứa 2 số x, y trên 1 dòng.


Ràng buộc

x, y là số nguyên. 1<=x, y<=10^6


Đầu ra

In ra kết quả của hàm F(x, y)


Ví dụ

Input 01
6 3
Output 01
54

Comments

Please read the guidelines before commenting.



  • -1
    L8_DuongThanhKhiem  commented on Nov. 22, 2025, 4:04 a.m.

    FULL AC:

    #include <bits/stdc++.h>
    using namespace std;
    long long x, y;
    int main(){
        cin >> x >> y;
        long long F = 5 * x + 2 * y + x * y;
        cout << F;
        return 0;
    }
    

  • 0
    Huyen  commented on Oct. 28, 2025, 1:44 p.m.

    include <bits/stdc++.h>

    using namespace std;

    int main() { long long x, y; cin >> x >> y; long long F = 5 * x + 2 * y + x * y; cout << F; return 0; }


  • -1
    bengokyeuanh99  commented on April 6, 2025, 11:37 a.m.

    include <bits/stdc++.h>

    using namespace std;

    int main() { long long x, y; cin >> x >> y; long long result = 5 * x + 2 * y + x * y; cout << result << '\n'; return 0; }


  • -11
    Try_hardxx  commented on Oct. 27, 2024, 3:43 a.m.

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