Pagini recente » Cod sursa (job #2657109) | Cod sursa (job #170706) | Cod sursa (job #292815) | Cod sursa (job #638398) | Cod sursa (job #3218367)
#include <iostream>
#include <cmath>
#include <fstream>
#include <limits.h>
#define ll long long
#define ull unsigned long long
namespace std {
int howManyDigits(int nr) {
int count = 0;
while (nr) nr /= 10, count++;
return count;
}
int sumDigits(int nr) {
int sum = 0;
while (nr)sum += nr % 10, nr /= 10;
return sum;
}
bool palindrom(ull nr) {
ull newNr = 0, aux = nr;
while (aux) {
newNr = newNr * 10 + aux % 10;
aux /= 10;
}
return newNr == nr;
}
ull ogl(ull nr) {
ull newNr = 0;
while (nr)
{
newNr = newNr * 10 + nr % 10;
nr /= 10;
}
return newNr;
}
int sumDiv(int nr) {
int sum = 0;
for (int i = 1; i * i <= nr; i++) {
if (nr % i == 0)
{
sum += i;
if (i * i < nr) {
sum += (nr / i);
}
}
}
return sum;
}
int howManyDivs(int nr) {
int countt = 0;
for (int d = 1; d * d <= nr; d++)
if (nr % d == 0) {
countt++;
if (d * d < nr)
countt++;
}
return countt;
}
bool prim(int nr) {
if (nr == 1)
return false;
if (nr == 2)
return true;
if (nr % 2 == 0)
return false;
for (int i = 3; i * i <= nr; i += 2)
if (nr % i == 0)
return false;
return true;
}
bool primm(int nr) {
if (nr < 2)
return false;
if (nr <= 3)
return true;
if (nr % 2 == 0 || nr % 3 == 0)
return false;
for (int d = 5; d * d <= nr; d += 6)
if (nr % d == 0 || nr % (d + 2) == 0)
return false;
return true;
}
int cmmdc(int nr1, int nr2) {
while (nr1 != nr2) {
if (nr1 > nr2)
nr1 -= nr2;
else nr2 -= nr1;
}
return nr1;
}
int cmmdcRest(int nr1, int nr2) {
int r;
while (nr1) {
r = nr2 % nr1;
nr2 = nr1;
nr1 = r;
} /// 12 5 -> 2 12 -> 0 2
return nr2;
}
int cmmmc(int nr1, int nr2) {
int a = nr1, b = nr2;
while (nr1 != nr2) {
if (nr1 < nr2)
nr1 += a;
else nr2 += b;
}
return nr1;
}
ll cmmmcRest(ll a, ll b) {
ll r, p;
p = a * b;
while (b) {
r = a % b;
a = b;
b = r;
}
return p / a;
}
int fastCmmdc(int nr1, int nr2) {
if (nr1 == 0) return nr2;
return fastCmmdc(nr2 % nr1, nr1);
}
/// a b
/// 8 5 --> 5 8 -->
/// 5 8 --> 3 5 --> 2 3 --> 1 2 --> 0 1
}
const std::string fileName = "adunare";
std::ifstream in(fileName + ".in");
std::ofstream out(fileName + ".out");
using std::cin;
using std::cout;
using std::endl;
void solve() {
int a, b;
in >> a >> b;
out << a + b;
}
int main()
{
solve();
return 0;
}