SlideShare a Scribd company logo
1 of 11
PRETEST 3-2-5
하기 삼각형 만들기
201338034
컴퓨터 응용과 2학년 A반 이왕원
목차
1.문제 설명 - 일단 문제는 이렇
습니다.
2.알고리즘 구상 - 이걸 어찌 푸
나요.
3.다시 코딩 - 코드는 이렇습니다.
1. 문제 설명 – 일단 문제
는 이렇습니다
0 ~ 9까지의 숫자를 이용해서 삼각형을 만드는 문제
입니다.
삼각형의 선분을 따라서 0 ~ 9까지의 숫자가 순차적
으로 나열되어있습니다.
이 것을 출력하는 것이 문제지만, for문을 이용하라
는 것이 조건입니다.
←
일단 이렇게 되면 문제 풀었다고 치고 진행할게요.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
저는 일단 숫자 그룹을 3개로
나눴습니다.
N이 0, 1, 2, 3, 4일 때,
빨간 부분은 첫 항이 0 공차가
2인 등차수열에 해당하고,
초록 부분은 첫 항이 1 공차가
2인 등차수열에 해당합니다.
또한 파란 부분은 그 두개의 합
집합에 해당하구요.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
그리고 코딩하면 이렇습니다.
N이 0~4라고 했으니 for문으
로 0~4까지 만듭니다.
그리고 해당하는 자리에 아까
만들었던 수식대로 넣습니다.
N 대신에 i를 썼으므로 그거만
바꿔서 보시면 동일합니다.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
이제 위치를 정해야 하는데,
아까 나눈 그룹 기준으로 보았
습니다.
각 위치를 데카르트 좌표계 기
준으로 수치화 해보니, 역시나
규칙성이 보입니다.
그리고 Y축이 거꾸로 되어있는
데, 콘솔창 출력시 위에서부터
출력하기 때문에, 이해하기 쉽
게 위에서부터 잡았습니다.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
역시나 규칙성이 보여서 점화
식 뽑아냈습니다.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
빨간색, 초록색 표시는 식이 동
일하게 사용된 것을 알 수 있습
니다.
파란색 표시가 조금 다른데,
2n + 1 자리로 이동하고 문자
를 출력하면 자동으로 2n + 2
자리로 이동하게 되므로 생략
하였습니다.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
역시나 규칙성이 보여서 점화
식 뽑아냈습니다.
2. 알고리즘 구상 - 이걸
어찌 푸나요.
역시나 식이 동일하게 사용된
것을 알 수 있습니다.
3. 다시 코딩 - 코드는 이
렇습니다.
얼추 이러한데,
그냥 보여드리면서
설명 드릴게요.

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Pretest 3 2-5 하기 삼각형 만들기

  • 1. PRETEST 3-2-5 하기 삼각형 만들기 201338034 컴퓨터 응용과 2학년 A반 이왕원
  • 2. 목차 1.문제 설명 - 일단 문제는 이렇 습니다. 2.알고리즘 구상 - 이걸 어찌 푸 나요. 3.다시 코딩 - 코드는 이렇습니다.
  • 3. 1. 문제 설명 – 일단 문제 는 이렇습니다 0 ~ 9까지의 숫자를 이용해서 삼각형을 만드는 문제 입니다. 삼각형의 선분을 따라서 0 ~ 9까지의 숫자가 순차적 으로 나열되어있습니다. 이 것을 출력하는 것이 문제지만, for문을 이용하라 는 것이 조건입니다. ← 일단 이렇게 되면 문제 풀었다고 치고 진행할게요.
  • 4. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 저는 일단 숫자 그룹을 3개로 나눴습니다. N이 0, 1, 2, 3, 4일 때, 빨간 부분은 첫 항이 0 공차가 2인 등차수열에 해당하고, 초록 부분은 첫 항이 1 공차가 2인 등차수열에 해당합니다. 또한 파란 부분은 그 두개의 합 집합에 해당하구요.
  • 5. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 그리고 코딩하면 이렇습니다. N이 0~4라고 했으니 for문으 로 0~4까지 만듭니다. 그리고 해당하는 자리에 아까 만들었던 수식대로 넣습니다. N 대신에 i를 썼으므로 그거만 바꿔서 보시면 동일합니다.
  • 6. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 이제 위치를 정해야 하는데, 아까 나눈 그룹 기준으로 보았 습니다. 각 위치를 데카르트 좌표계 기 준으로 수치화 해보니, 역시나 규칙성이 보입니다. 그리고 Y축이 거꾸로 되어있는 데, 콘솔창 출력시 위에서부터 출력하기 때문에, 이해하기 쉽 게 위에서부터 잡았습니다.
  • 7. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 역시나 규칙성이 보여서 점화 식 뽑아냈습니다.
  • 8. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 빨간색, 초록색 표시는 식이 동 일하게 사용된 것을 알 수 있습 니다. 파란색 표시가 조금 다른데, 2n + 1 자리로 이동하고 문자 를 출력하면 자동으로 2n + 2 자리로 이동하게 되므로 생략 하였습니다.
  • 9. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 역시나 규칙성이 보여서 점화 식 뽑아냈습니다.
  • 10. 2. 알고리즘 구상 - 이걸 어찌 푸나요. 역시나 식이 동일하게 사용된 것을 알 수 있습니다.
  • 11. 3. 다시 코딩 - 코드는 이 렇습니다. 얼추 이러한데, 그냥 보여드리면서 설명 드릴게요.