본문 바로가기

코딩테스트/Python

[코드업] 파이썬 기초 100제 71~80

71.

while True:
    n = int(input())
    if n==0:
        break
    print(n)

 

72.

n = int(input())

for i in range(n,0,-1):
    print(i)

 

73.

n = int(input())

for i in range(n-1,-1,-1):
    print(i)

 

74.

a = input()

i=0

while True:
    print(chr(ord('a')+i))
    if chr(ord('a')+i) == a:
        break
    i+=1

 

75.

a = int(input())

for i in range(a+1):
    print(i)

 

76.

a = int(input())

i=0

while i<=a:
    print(i)
    i+=1

 

77.

a = int(input())

print(sum([i for i in range(a+1) if i%2==0]))

 

78,

while True:
    a = input()
    print(a)
    if a == 'q':
        break

 

79.

n = int(input())
i=0
sol=0
while sol<n:
   sol+=i
   i+=1

print(i-1)

 

80.

a,b = input().split()

for i in range(1,int(a)+1):
    for j in range(1,int(b)+1):
        print(i,j)