728x90
반응형
JUNGOL 정보올림피아드&알고리즘에서 학습용으로 문제를 가져왔습니다. 문제가 될 시 수정, 삭제하겠습니다.
841
a=int(input())
lst=[]
for i in range(a,0,-1):
lst.append(i)
print(lst)
842
a=input()
for i in range(20):
print(a,end="")
843
for i in range(11):
print(i+10,end=" ")
844
a=int(input())
for i in range(1,a+1):
if i%2==0:
print(i, end=" ")
845
a=int(input())
lst=[]
for i in range(a,101):
lst.append(i)
print(sum(lst))
846
a=map(int,input().split())
lst_t=[]
lst_f=[]
for i in a:
if i%3==0:
lst_t.append(i)
if i%5==0:
lst_f.append(i)
print("Multiples of 3 : %d"%len(lst_t))
print("Multiples of 5 : %d"%len(lst_f))
847
a=list(map(int,input().split()))
print("avg : %.1f"%(sum(a)/len(a)))
if sum(a)/len(a)>=80:
print("pass")
else:
print("fail")
848
for i in range(5):
for j in range(5):
print(i+j+2, end=" ")
print()
849
for i in range(2,5):
for j in range(1,6):
if i*j>=10:
print("%d * %d = %d " % (i, j, i * j), end="")
else:
print("%d * %d = %d "%(i,j,i*j),end="")
print()
850
a=int(input())
for i in range(a):
print("JUNGOL")
851
a=list(map(int,input().split()))
for i in range(min(a),max(a)+1):
print(i,end=" ")
852
a=int(input())
lst=[]
for i in range(a+1):
if i%5==0:
lst.append(i)
print(sum(lst))
853
a=list(map(int,input().split()))
print("%.2f"%(sum(a)/len(a)))
854
a=list(map(int,input().split()))
even=[]
odd=[]
for i in a:
if i%2==0:
even.append(i)
elif i%2==1:
odd.append(i)
print("even : %d"%(len(even)))
print("odd : %d"%(len(odd)))
855
a=list(map(int,input().split()))
lst=[]
for i in range(min(a),max(a)+1):
if i%3==0 or i%5==0:
lst.append(i)
print("sum : %d"%(sum(lst)))
print("avg : %.1f"%(sum(lst)/len(lst)))
856
a=int(input())
for i in range(1,11):
print(a*i,end=" ")
857
a=list(map(int,input().split()))
for i in range(1,a[0]+1):
for j in range(1,a[1]+1):
print(i*j, end=" ")
print()
858
a=int(input())
for i in range(1,a+1):
for j in range(1, a+1):
print("(%d, %d)"%(i,j),end=" ")
print()
859 Wrong Answer(0)
a=list(map(int,input().split()))
if a[0]>a[1]:
for i in range(a[0],a[1]-1,-1):
for j in range(1,10):
print("%d * %d = %d "%(i,j,i*j))
print()
elif a[0]<a[1]:
for i in range(a[0],a[1]+1):
for j in range(1,10):
print("%d * %d = %d " % (i, j, i * j), end="")
print()
반응형
'Programming > JUNGOL : 정보올림피아드&알고리즘' 카테고리의 다른 글
[JUNGOL LCoder_Python 함수2]:981~992 (0) | 2022.02.01 |
---|---|
[JUNGOL LCoder_Python 함수1]:961~973 (0) | 2022.01.31 |
[JUNGOL LCoder_Python 반복제어문]:821~831 (1) | 2022.01.26 |
[JUNGOL LCoder_Python 선택제어문]:801~814 (0) | 2022.01.26 |
[JUNGOL LCoder_Python 리스트1]:781~795 (0) | 2022.01.26 |