문자 출력하기
https://www.codetree.ai/missions/4/problems/print-text?&utm_source=clipboard&utm_medium=text
w = input()
for _ in range(8):
print(w, end="")
문자열 출력하기
https://www.codetree.ai/missions/4/problems/print-string?&utm_source=clipboard&utm_medium=text
n = int(input())
for _ in range(n):
print("LeebrosCode")
a/b 출력
https://www.codetree.ai/missions/4/problems/a-divide-b?&utm_source=clipboard&utm_medium=text
i = input().split()
a,b = int(i[0]), int(i[1])
print(f"{a//b}.", end="")
a %= b
for _ in range(20):
a *= 10
print(a//b, end="")
a %= b
n번 더하기
https://www.codetree.ai/missions/4/problems/add-n-times?&utm_source=clipboard&utm_medium=text
i = input().split()
a,n = int(i[0]), int(i[1])
for _ in range(n):
a += n
print(a)
'코딩테스트 > 프로그래밍 기초 | 단순 반복문' 카테고리의 다른 글
[코드트리] 반복문 안의 if (0) | 2025.01.03 |
---|---|
[코드트리] if 안의 for (0) | 2024.12.30 |
[코드트리] while문 b → a 1씩 감소 (0) | 2024.12.27 |
while문 a → b 2씩 증가 (0) | 2024.12.27 |
[코드트리] while문 a → b 1씩 증가 (0) | 2024.12.27 |