HelloMinchan
처음처럼
HelloMinchan
LinkedIn
전체 방문자
오늘
어제
  • 분류 전체보기 (306)
    • Backend (4)
      • NestJS (1)
      • Express (1)
      • Spring (2)
    • Infrastructure (1)
      • AWS (1)
    • Frontend (1)
      • Next.js (1)
    • Language & Runtime (4)
      • Java (2)
      • Node.js (2)
    • Computer Science (8)
      • Computer Networks (3)
      • Operating Systems (4)
      • OOP (1)
    • 독서 (4)
      • 데이터 중심 애플리케이션 설계 (3)
      • 객체지향의 사실과 오해 (1)
    • 회고 (4)
      • Project (2)
      • Career (2)
    • Deprecated (280)

채널

  • GitHub
  • LinkedIn

최근 글

태그

  • Database
  • programmers
  • 개발자
  • 알고스팟Python
  • 백준Python
  • 프로그래머스
  • Algospot
  • 데이터베이스
  • 백준Go
  • 백엔드
  • 백준
  • back-end
  • 프로그래머스C++
  • 알고스팟
  • 백준C++
  • Baekjoon Online Judge
  • 프로그래머스Python
  • front-end
  • 코딩
  • 프로그래밍

최근 댓글

인기 글

hELLO
HelloMinchan

처음처럼

[Baekjoon Online Judge] 백준 2523번 별 찍기 - 13(Python)
Deprecated

[Baekjoon Online Judge] 백준 2523번 별 찍기 - 13(Python)

2020. 3. 14. 11:06

© 2020 All Rights Reserved. 주식회사 스타트링크

[Baekjoon Online Judge] 백준 2523번 별 찍기 - 13

(Python)

(글쓴날 : 2020.03.14)

 


* Baekjoon Online Judge, 백준 2523번 문제 Python 언어 풀이입니다.

* 소스 코드의 저작권은 글쓴이에게 있습니다.


 

 

백준 2523번 별 찍기 - 13


1) 문제

문제 링크 : https://www.acmicpc.net/problem/2523

 

2523번: 별 찍기 - 13

첫째 줄부터 2×N-1번째 줄까지 차례대로 별을 출력한다.

www.acmicpc.net


2) 풀이 과정

예시를 보고 규칙을 찾아 별을 출력하는 문제입니다.

규칙은 1부터 문제에서 주어지는 숫자까지 별의 개수가 점점 증가하다 그 뒤로 다시 1까지 감소하는 것이며,

반복문을 이용해 문제를 해결해 주시면 되겠습니다.


3) 코드

 

* Python 코드

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys
input = sys.stdin.readline
 
N = int(input())
 
for i in range(1, N + 1):
    for j in range(i):
        print("*", end="")
    print()
 
for i in range(N - 1, 0, -1):
    for j in range(i):
        print("*", end="")
    print()

 

저작자표시 비영리 변경금지 (새창열림)

'Deprecated' 카테고리의 다른 글

[Baekjoon Online Judge] 백준 10996번 별 찍기 - 21(Python)  (0) 2020.03.14
[Baekjoon Online Judge] 백준 2446번 별 찍기 - 9(Python)  (0) 2020.03.14
[Baekjoon Online Judge] 백준 10039번 평균 점수(Python)  (0) 2020.03.14
[CSS] CSS 초기화(Reset) 코드 모음  (0) 2020.03.12
[LeetCode] 리트코드 1266번 Minimum Time Visiting All Points(Python)  (0) 2020.03.11
    'Deprecated' 카테고리의 다른 글
    • [Baekjoon Online Judge] 백준 10996번 별 찍기 - 21(Python)
    • [Baekjoon Online Judge] 백준 2446번 별 찍기 - 9(Python)
    • [Baekjoon Online Judge] 백준 10039번 평균 점수(Python)
    • [CSS] CSS 초기화(Reset) 코드 모음
    HelloMinchan
    HelloMinchan
    Though you should not fear failure, You should do your very best to avoid it.

    티스토리툴바