Cod sursa(job #2706363)
Utilizator | Data | 14 februarie 2021 18:13:31 | |
---|---|---|---|
Problema | A+B | Scor | 100 |
Compilator | cpp-32 | Status | done |
Runda | Arhiva de probleme | Marime | 0.59 kb |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<double, double>;
using pld = pair<ld, ld>;
int main()
{
ifstream cin("adunare.in");
ofstream cout("adunare.out");
int a, b;
cin >> a >> b;
auto Sum = [&](auto &Self, const int depth) -> int
{
if (depth == 0)
{
return a + b;
}
return Self(Self, depth - 1);
};
cout << Sum(Sum, 1);
}