본문 바로가기
반응형

기초100제8

[CodeUp][Python]코드업 기초100제(끝) 6091~6098 그냥 듀크입니다. 기초100제도 이번 포스팅으로 끝이 나는데요. 다른 괜찮은 문제들도 있으니 코드업 관련 포스팅은 계속할 것 같습니다. 오늘도 힘내서 가봅시다. 6091 a,b,c = map(int, input().split()) n = 1 while 1: if n%a==0 and n%b==0 and n%c==0: print(n) break n += 1 6092 n = int(input()) call = list(map(int, input().split())) check = [] for i in range(1,24): check.append(call.count(i)) for i in check: print(i,end = ' ') 6093 n=input() call=list(map(int,input().s.. 2021. 11. 13.
[CodeUp][Python]기초 100제 6081~6090 이제부터는 전에 배웠던 기본적인 것들을 이용해서 간단한 구현을 하는 문제들이 나오더라구요. 그렇게 어렵진 않으니 같이 한 번 가봅시다. 그리고 제 경험상 뭔가 혼자서 계속 고민하면서 직접 해보는게 실력이 느는 순간이더라구요. 6081 n = int(input(),16) for i in range(1 , 16): answer = n*i print(f"{'%X'%n}*{'%X'%i}={'%X'%answer}") 6082 n = int(input()) for i in range(1,n+1): if str(i).find('3') != -1 or str(i).find('6') != -1 or str(i).find('9') != -1: print('X', end = ' ') else: print(i, end = '.. 2021. 11. 2.
[CodeUp][Python]코드업 기초 100제 6071~6080 바로 갑시다. 6071 while 1: n = int(input()) if n == 0: break print(n) 6072 def count_down(n): if n>0: print(n) count_down(n-1) count_down(int(input())) 6073 def count_down(n): if n>0: print(n-1) count_down(n-1) count_down(int(input())) 6074 s = ord(input()) t = ord('a') while t 2021. 10. 24.
[CodeUp][Python]코드업 기초 100제 6061~6070 오랜만에 찾아뵙는 코드업 기초 100제 풀이입니다. 문제링크 : https://codeup.kr/problemsetsol.php?psid=33 문제집 / Python 기초 100제 codeup.kr 6061: a,b = map(int, input().split()) print(a|b) 6062: a,b = map(int, input().split()) print(a^b) 6063: a,b = map(int, input().split()) print(a if (a>=b) else b) 6064: a,b,c = map(int, input().split()) print((a if a 2021. 10. 15.
[CodeUp][Python]코드업 기초 100제 6051~6060 요즘 이것저것 바쁜 일이 생기니 자꾸 포스팅이 늦어지네요. 그래도 열심히 해보겠습니다. 문제링크 : https://codeup.kr/problemsetsol.php?psid=33 문제집 / Python 기초 100제 codeup.kr 6051: a,b = map(int, input().split()) print(a != b) 6052: n = int(input()) print(bool(n)) 6053: a = bool(int(input())) print(not a) 6054: a, b = input().split() print(bool(int(a)) and bool(int(b))) 6055: a,b = map(int, input().split()) if a == True or b == True: prin.. 2021. 9. 25.
[CodeUp][Python]코드업 기초 100제 6041~6050 어느새 절반이나 왔네요. 지겨워도 힘내서 가봅시다. 문제링크: https://codeup.kr/problemsetsol.php?psid=33 문제집 / Python 기초 100제 codeup.kr 6041: a,b = input().split() print(int(a)%int(b)) 6042: a = float(input()) print(format(a, '.2f')) 6043: a,b = input().split() print(format(float(a)/float(b),'.3f')) 6044: a,b = input().split() print(int(a)+int(b)) print(int(a)-int(b)) print(int(a)*int(b)) print(int(a)//int(b)) print(int(.. 2021. 9. 21.
[CodeUp][Python]코드업 기초 100제 6031~6040 문제 페이지에서도 풀이를 바로 제공하고 있기 때문에 큰 어려움 없이 다들 할 수 있을겁니다. 제가 풀어보면서 느낀 바로는 기초 100제는 해당 IDE에 익숙해지도록 돕는다는 느낌이 들었기 때문에 차근차근 문제가 요구하는 것을 따라하면 쉽게 가능할겁니다. 서론이 길었네요. 가봅시다. 문제링크: https://codeup.kr/problemsetsol.php?psid=33 문제집 / Python 기초 100제 codeup.kr 6031: print(chr(int(input()))) 6032: print(-int(input())) 6033: print(chr(ord(input())+1)) 6034: a,b = (map(int, input().split())) print(a-b) 6035: a,b = map(f.. 2021. 9. 20.
[CodeUp][Python]코드업 기초 100제 6011~6020 지난 포스팅에 이어서 오늘은 6011~6020번 까지 제가 푼 소스를 보여드리겠습니다. 코딩에는 정해진 길이란 게 없으니 다른 사람은 이렇게도 푸는구나 하고 넘어가셔도 무방합니다. 이번에는 문자열 format을 가급적 많이 쓰려고 해봤습니다. 문제 링크 : https://codeup.kr/problemsetsol.php?psid=33 문제집 / Python 기초 100제 codeup.kr 6011: print(float(input())) 6012: a = input() b = input() print('{}\n{}'.format(a,b)) 6013: a = input() b = input() print('{}\n{}'.format(b,a)) 6014: a=float(input()) print('{}\n{.. 2021. 9. 15.
반응형