728x90
6903번: Trident
A trident is a fork with three tines (prongs). A simple picture of a trident can be made from asterisks and spaces: * * * * * * * * * ******* * * * * In this example, each tine is a vertical column of 3 asterisks. Each tine is separated by 2 spaces. The ha
www.acmicpc.net
문제 풀이
삼지창을 출력하는 문제이다. "*"을 주어진 간격에 맞추어 찍어준다.
정답 링크
t = int(input())
s = int(input())
h = int(input())
for _ in range(t) : print("*" + " " * s + "*" + " " * s + "*")
print("*" * (3 + s * 2))
for _ in range(h) : print(" " * (1 + s) + "*")
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 6975 - Deficient, Perfect, and Abundant [python] (0) | 2023.03.20 |
---|---|
[BOJ/백준] 6974 - Long Division [python] (0) | 2023.03.20 |
[BOJ/백준] 6889 - Smile with Similes [python] (1) | 2023.03.19 |
[BOJ/백준] 6845 - Federal Voting Age [python] (0) | 2023.03.19 |
[BOJ/백준] 6830 - It’s Cold Here! [python] (0) | 2023.03.19 |