본문 바로가기
SMALL

프로그래밍언어/Code_Practice20

[SW Expert Academy] 조교의 성적 매기기 *문제의 저작권은 SW Expert에 있습니다. 문제 링크 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PwGK6AcIDFAUq&categoryId=AV5PwGK6AcIDFAUq&categoryType=CODE T = int(input()) score = ["A+", "A0", "A-", "B+", "B0", "B-", "C+", "C0", "C-", "D0"] for test_case in range(1,T+1): N, K = map(int, input().split()) a = [] c = 0 for t_case in range(1, N + 1): test = list(map(int, input()... 2021. 1. 21.
[SW Expert Academy] 자릿수 더하기 *문제의 저작권은 SW Expert에 있습니다. 문제 링크 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QPRjqA10DFAUq&categoryId=AV5QPRjqA10DFAUq&categoryType=CODE T = int(input()) T1 = int(T/1000) T2 = int((T%1000)/100) T3 = int((T%100)/10) T4 = int(T%10) result = T1+T2+T3+T4 print(result) 2021. 1. 20.
[SW Expert Academy] 중간값 찾기 *문제의 저작권은 SW Expert에 있습니다. 문제 링크 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QPsXKA2UDFAUq&categoryId=AV5QPsXKA2UDFAUq&categoryType=CODE import statistics T = int(input()) result = list(map(int, input().split(" "))) #result.sort() #a = int(T/2) #print("{}".format(result[a])) print(statistics.median(result)) median함수를 사용하려면 statistics를 import해야 함. 사용 시 코드는 짧아.. 2021. 1. 20.
[SW Expert Academy] 최대수 구하기 *문제의 저작권은 SW Expert에 있습니다. 문제 링크 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QQhbqA4QDFAUq&categoryId=AV5QQhbqA4QDFAUq&categoryType=CODE T = int(input()) for test_case in range(1, T + 1): result = list(map(int, input().split(" "))) result.sort(reverse=True) print("#{} {}".format(test_case,result[0])) 2021. 1. 20.
[SW Expert Academy] 큰 놈, 작은 놈, 같은 놈 *문제의 저작권은 SW Expert에 있습니다. 문제 링크 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QQ6qqA40DFAUq&categoryId=AV5QQ6qqA40DFAUq&categoryType=CODE T = int(input()) for test_case in range(1, T + 1): result = list(map(int, input().split(" "))) if result[0]!=result[1] : if result[0]>result[1] : print("#{} {}".format(test_case,">")) else : print("#{} {}".format(test_case," 2021. 1. 20.
[SW Expert Academy] 평균값 구하기 *문제의 저작권은 SW Expert에 있습니다. 문제 링크 : https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QRnJqA5cDFAUq&categoryId=AV5QRnJqA5cDFAUq&categoryType=CODE T = int(input()) for test_case in range(1, T + 1): result = list(map(int, input().split(" "))) print("#{} {}".format(test_case, round(sum(result)/len(result))) 2021. 1. 20.
LIST