# data[].attributes.body
#include <iostream>
#include<string>
using namespace std;

int main()
{
int N;
int i;
int k;
int j;
cin >> N;
for (i = 1; i < N + 1; i++)
{
for (j = 0; j < N - i; j++)
{
cout << " ";
}
for (k = 0; k < i ; k++)
{
cout << "*";
}

cout << "\n";
}
for (i = 1; i < N + 1; i++)
{
for (j = 0; j < i; j++)
{
cout << " ";
}
for (k = N; k > i; k--)
{
cout << "*";
}
cout << "\n";
}

return 0;
}

# data[].attributes.body
#include <iostream>
#include<string>
using namespace std;

int main()
{
int N;
int i;
int k;
cin >> N;
for (i = 1; i < N + 1; i++)
{
for (k = 0; k < i ; k++)
{
cout << "*";
}

cout << "\n";
}
for (i = 1; i < N + 1; i++)
{
for (k = N; k > i; k--)
{
cout << "*";
}
cout << "\n";
}

return 0;
}

# data[].attributes.body
#include <iostream>
#include<string>
using namespace std;

int main()
{
int N;
int i;
int j;
int k;
cin >> N;
for (i = 1; i < N+1; i++)
{
for (j=0;j<N-i;j++)
{
cout << " ";
}
for (k=0;k<i*2-1;k++)
{
cout << "*";
}
cout << "\n";
}

return 0;
}

# data[].attributes.body
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
using namespace std;

int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);

int a, b, c;
cin >> a >> b >> c;

string A = to_string(a * b * c);

for (int i = 0; i < 10; i++) {
int count = 0;
for (int j = 0; j < A.size(); j++) {
if ( i == A[j] - '0') {
count++;
}
}
cout << count << "\n";
}
}

# data[].attributes.body
#include<iostream>
using namespace std;
int main() {
int N;
cin >> N;

int i = 1;
while (N > i) {
N -= i;
i++;
}

if (i % 2 == 1)
cout << i + 1 - N << '/' << N << endl;
else
cout << N << '/' << i + 1 - N << endl;
}

# data[].attributes.body
#include<iostream>
using namespace std;
int main() {
string str;
cin >> str;

int arr[10] = { 0 };

for (int i = 0; i < str.size(); i++) {
int tmp = str[i] - '0';
if (tmp == 9) {
arr[6]++;
}
else {
arr[tmp]++;
}
}
if (arr[6] % 2 == 0) {
arr[6] /= 2;
}
else {
arr[6] = (arr[6] / 2) + 1;
}

int Count = 0;

for (int i = 0; i < 10; i++) {
if (arr[i] > Count) {
Count = arr[i];
}
}
cout << Count << endl;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
void a(int n) {
for (int i = 0; i < n;i++) {
for (int j = 0; j < n; j++)
cout << "@";
for (int j = 0; j < n; j++)
cout << "   ";
for (int j = 0; j < n; j++)
cout << "@";
cout << endl;
}
}
void b(int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
cout << "@@@@@";
cout << endl;
}
}
int main() {
int n;
cin >> n;
a(n);
for (int i = 0; i < 2; i++) {
a(n); b(n);
}
}

# data[].attributes.headline
1110 더하기 사이클 코드

# data[].attributes.subject
1110 더하기 사이클 코드

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;

int main(void)
{
    int N, newN;
    int ten, one;
    int count = 0;
    
    cin >> N;
    newN = N;
    
    do
    {
        ten = newN / 10;
        one = newN % 10;
        
        newN = (one * 10) + ((ten + one) % 10);
        
        count++;
    } while (N != newN);
    
    cout << count << endl;
    
    return 0;
}

# data[].attributes.body
#include <iostream>
#include <string>
using namespace std;

int main() {
int a1, a2, a3, high, count = 0;
cin >> a1 >> a2 >> a3;

a1 > a2 ? a1 > a3 ? high = a1 : high = a3 : a2 > a3 ? high = a2 : high = a3 ;

if (a1 == a2 && a2 == a3) {
cout << 10000 + a1 * 1000;
}
else if (a1 == a2 || a1 == a3) {
cout << 1000 + a1 * 100;
}
else if (a2 == a3) {
cout << 1000 + a2 * 100;
}
else {
cout << high * 100;
}

return 0;
}

# data[].attributes.body
#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main() {
int n, a = 0;
string s;
cin >> n;
cin >> s;
for (int i = 0; i < n; i++) {
a += ('0' - int(s[i]))*-1;
}
cout << a;
}

# data[].attributes.body
#include <iostream>
#include <string>

using namespace std;

int main() {
string a,ans;
while (true) {
cin >> a;
if (stoi(a) == 0) {
break;
}
else {
for (int i = 0; i < a.size(); i++) {
if (a[0+i] == a[a.size() - 1 - i]) {
ans = "yes\n";
}
else {
ans = "no\n";
break;
}
}
}
cout << ans;
}

}

# data[].attributes.body
#include
#include

using namespace std;

int main() {
int a,b,c;
cin >> a >> b >> c;
if (a == b && a == c) {
cout << (10000 + a * 1000);
}
else if (a == b) {
cout << (1000 + a * 100);
}
else if (b == c) {
cout << (1000 + b * 100);
}
else if (c == a) {
cout << (1000 + c * 100);
}
else {
cout << max({a, b, c}) * 100;
}
return 0;
}

# data[].attributes.body
#include <iostream>
#include <algorithm>

using namespace std;

int main() {
int a,b,c;
cin >> a >> b >> c;
if (a == b && a == c) {
cout << (10000 + a * 1000);
}
else if (a == b) {
cout << (1000 + a * 100);
}
else if (b == c) {
cout << (1000 + b * 100);
}
else if (c == a) {
cout << (1000 + c * 100);
}
else {
cout << max({a, b, c}) * 100;
}
return 0;
}

# data[].attributes.headline
코딩 잘하고 싶은 사람

# data[].attributes.subject
코딩 잘하고 싶은 사람

# data[].attributes.body
단계별로 풀어보기 (acmicpc.net)
추가로 더 풀어보기

# data[].attributes.body
boj.kr/2480
선택) boj.kr/1259
선택) boj.kr/11720
선택인 이유 : 반복문을 알아야 해서
반복문 아는 사람들은 해오시면 됩니다.

# data[].attributes.attachment_link.readable_text
#include <iostream>
#include <ios>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    char A;
    cin >> A;
    cout << (int)A;
    return 0;
}

# data[].attributes.body
#include <iostream>
#include <ios>
using namespace std;

int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
char A;
cin >> A;
cout << (int)A;
return 0;
}

# data[].attributes.body
window + shift + s 눌러 캡쳐한다,
각 섹션의 아래 있는 +를 누른다.
Ctrl + V 로 붙여넣기한다.
발행을 누른다.

# data[].attributes.attachment_link.readable_text
#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	string tempStr;
	char temp;
	int i;

	while (true)
	{
		cin >> str;

		if (stoi(str) == 0)
		{
			break;
		}

		tempStr = str;

		for (i = 0; i < tempStr.size() / 2; i++)
		{
			temp = tempStr[i];
			tempStr[i] = tempStr[tempStr.size() - 1 - i];
			tempStr[tempStr.size() - 1 - i] = temp;
		}

		if (str == tempStr)
		{
			cout << "yes" << endl;
		}
		else
		{
			cout << "no" << endl;
		}
	}
		
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	int N, sum = 0;
	int i;

	cin >> N;
	cin >> str;

	for (i = 0; i < N; i++)
	{
		sum += str[i] - '0';
	}

	cout << sum << endl;
		
	return 0;
}

# data[].attributes.body
#include<iostream>
#include<string>

using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (a == b && b == c)
cout << 10000 + a * 1000 << endl;
else if (a == b || b == c)
cout << 1000 + b * 100 << endl;
else if (a == c)
cout << 1000 + a * 100 << endl;
else if (a != b && b != c)
if (a != c)
if (a > b && a > c)
cout << a * 100 << endl;
else if (b > a && b > c)
cout << b * 100 << endl;
else if (c > a && c > b)
cout << c * 100 << endl;
}

# data[].attributes.body
#include<iostream>
#include<string>

using namespace std;

int main() {
string str;

while (true) {
cin >> str;
if (str == "0") break;

bool rig = true;
for (int i = 0; i < str.length() / 2; i++) {
if (str[i] != str[str.length() - 1 - i]) {
cout << "no" << endl;
rig = false;
break;
}
}

if (rig) cout << "yes" << endl;
}

return 0;
}