#include <iostream>
#include <string>
using namespace std;
int n = 0;
int n2 = 0;
string wyjscie;
void startup()
{
cin >> n;
n2 = n;
int n11 = n2;
while (n11 > 9)
{
wyjscie.append(to_string(9));
wyjscie.append("A");
n11 -= 9;
}
if (n11 != 1)
wyjscie.append(to_string(n11));
wyjscie.append("A");
int n22 = n2;
while (n22 > 9)
{
wyjscie.append(to_string(9));
wyjscie.append("E");
n22 -= 9;
}
if (n22 != 1)
wyjscie.append(to_string(n22));
wyjscie.append("E");
}
int main()
{
startup();
int i = 0;
while (i < n - 1)
{
n2--;
int n33 = n2;
while (n33 > 9)
{
wyjscie.append(to_string(9));
wyjscie.append("[CA]");
n33 -= 9;
}
if (n33 != 1)
{
wyjscie.append(to_string(n33));
wyjscie.append("[CA]");
}
else
wyjscie.append("CA");
wyjscie.append("C");
int n44 = n2;
while (n44 > 9)
{
wyjscie.append(to_string(9));
wyjscie.append("E");
n44 -= 9;
}
if (n44 != 1)
wyjscie.append(to_string(n44));
wyjscie.append("E");
i++;
}
wyjscie.append("C");
cout << wyjscie << endl;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #include <iostream> #include <string> using namespace std; int n = 0; int n2 = 0; string wyjscie; void startup() { cin >> n; n2 = n; int n11 = n2; while (n11 > 9) { wyjscie.append(to_string(9)); wyjscie.append("A"); n11 -= 9; } if (n11 != 1) wyjscie.append(to_string(n11)); wyjscie.append("A"); int n22 = n2; while (n22 > 9) { wyjscie.append(to_string(9)); wyjscie.append("E"); n22 -= 9; } if (n22 != 1) wyjscie.append(to_string(n22)); wyjscie.append("E"); } int main() { startup(); int i = 0; while (i < n - 1) { n2--; int n33 = n2; while (n33 > 9) { wyjscie.append(to_string(9)); wyjscie.append("[CA]"); n33 -= 9; } if (n33 != 1) { wyjscie.append(to_string(n33)); wyjscie.append("[CA]"); } else wyjscie.append("CA"); wyjscie.append("C"); int n44 = n2; while (n44 > 9) { wyjscie.append(to_string(9)); wyjscie.append("E"); n44 -= 9; } if (n44 != 1) wyjscie.append(to_string(n44)); wyjscie.append("E"); i++; } wyjscie.append("C"); cout << wyjscie << endl; } |
English