(2021.09.15)
https://www.acmicpc.net/step/19
※ All the C++ codes skipped the below lines. :
#include <iostream>
using namespace std;
#define endl '\n'When any additional header is used, the header block is also noted seperately.
(2021.07.27)
int fibonacci(int n)
{
if (n == 0) return 0;
if (n == 1) return 1;
return fibonacci(n - 1) + fibonacci(n - 2);
}int main()
{
int n;
cin >> n;
cout << fibonacci(n) << endl;
return 0;
}10
55
(2021.09.15)
char star(int r, int c, int n)
{
if (n <= 3)
{
if (r % 3 == 1 && c % 3 == 1) return ' ';
else return '*';
}
if (r / (n / 3) == 1 && c / (n / 3) == 1) return ' ';
return star(r % (n / 3), c % (n / 3), n / 3);
}int main()
{
int n;
cin >> n;
for (int r = 0; r < n; r++)
{
for (int c = 0; c < n; c++) cout << star(r, c, n);
cout << endl;
}
return 0;
}27
***************************
* ** ** ** ** ** ** ** ** *
***************************
*** ****** ****** ***
* * * ** * * ** * * *
*** ****** ****** ***
***************************
* ** ** ** ** ** ** ** ** *
***************************
……
not completed
int hanoi()
{
// need more codes ……
}int main()
{
int n;
cin >> n;
int k = pow(2, n) - 1;
cout << k << endl;
// need more codes ……
return 0;
}