Răspuns:
1. #include <iostream>
using namespace std;
int main()
{
int F, B, n, F1, B1;
cin >> F >> B >> n;
F1=3*n;
B1=2*n;
F=F1*F;
B=B1*B;
cout << F+B;
return 0;
}
2. #include <iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
cout << 1+3*(n*(n-1));
return 0;
}
Explicație: