Cod sursa(job #3296102)

Utilizator PescarusTanislav Luca Andrei Pescarus Data 11 mai 2025 15:13:42
Problema Dreptunghiuri Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <fstream>
using namespace std;

int main() {
    ifstream fin("dreptunghiuri.in");
    ofstream fout("dreptunghiuri.out");

    int m, n;
    fin >> m >> n;

    long long dreptunghiuri = 1LL * m * (m + 1) / 2 * 1LL * n * (n + 1) / 2;

    fout << dreptunghiuri << "\n";

    return 0;
}