![[백준 알고리즘] 10818번 최소, 최대(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2Fb8qtRR%2FbtqBUUjhoJh%2FAAAAAAAAAAAAAAAAAAAAABYZOQpYZhaA9_dbLOg6mZ3NwBPLPGuSZAqEiUdIEvJe%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DDmi%252F2atShoZ00aWV0cby9emMlOE%253D)
n = int(input()) a = list(map(int,input().split())) min, max = a[0], a[0] for i in range(n): if a[i] max: max = a[i] print(min, max) 출처: https://hwiyong.tistory.com/217 Case = int(input()) num_list = list(map(int, input().split())) print('{} {}'.format(min(num_list), max(num_list))) 문자열 대괄호 자리에 format 뒤의 괄호안에 있는 값을 하나씩 넣어 출력한다. import java.io.BufferedReader; import ja..
![[백준 알고리즘] 1110번 더하기 사이클(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FIMxcG%2FbtqBS7cAClb%2FAAAAAAAAAAAAAAAAAAAAAIqbGxQAipBIsKzcT7TQ1OrUqYvgzXuF5--w3oeElxLp%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DtarukZv%252F11v3z6JLLkm0MWvQ%252FxI%253D)
n = nn = int(input()) cycle = 0 while True: res = (n // 10) + (n % 10) cycle += 1 n = int(str(n % 10) + str(res % 10)) if nn == n: break print(cycle) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); i..
![[백준 알고리즘] 10951번 A+B - 4(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FcfgJmi%2FbtqBRw4LMrU%2FAAAAAAAAAAAAAAAAAAAAAGPlewh7EJwPbHbQJpUhQr72U6Catk8-Dazv8CWHjD_j%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DsVIauLXqJTmj7V8Eu3V4TCu4wPY%253D)
import sys try: while True: line = sys.stdin.readline() a, b = line.split() print(int(a) + int(b)) except: exit() 입력 개수를 모르기 때문에 try except를 사용하였다. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new ..
![[백준 알고리즘] 10952번 A+B - 5(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FPJKdD%2FbtqBUA6fWjP%2FAAAAAAAAAAAAAAAAAAAAACXeEXSVjee1QXFG642cFFefOs9AibjfJRY-XsayjBhL%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DiDFG%252FMaXhm4bgybb6aiveZUTe%252Fs%253D)
import sys while(1): line = sys.stdin.readline() a, b = line.split() if a == '0' and b == '0': break print(int(a)+int(b)) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true){ String[] line = ..
![[백준 알고리즘] 11022번 A+B - 8(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FIK5e7%2FbtqBWrUMpGk%2FAAAAAAAAAAAAAAAAAAAAAGEbT0BVgUpIFyNLEVk-muj-EaI--jcZLU17KJN9yETE%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DhlobX%252BB90UTaucFeMJj4SYx62iY%253D)
import sys n = int(sys.stdin.readline()) for i in range(1, n+1): line = sys.stdin.readline() a, b = line.split() print("Case #%d: %d + %d = %d" %(i, int(a), int(b), int(a)+int(b))) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class b_11022 { public static void main(String[] args) throws IOException { Buffere..
![[백준 알고리즘] 11021번 A+B - 7(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FlDpGb%2FbtqBS6EA5hx%2FAAAAAAAAAAAAAAAAAAAAACBABwbIFf3nzXdjRdLhrHAlt-eyepBXsHobxUxqJY8s%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DbnH%252BqOJpfDx1cyHa3aY9dD7Hmrg%253D)
import sys n = int(sys.stdin.readline()) for i in range(1, n+1): line = sys.stdin.readline() a, b = line.split() print("Case #%d: %d" %(i,int(a)+int(b))) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class b_11021 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedRe..
![[백준 알고리즘] 1552번 빠른 A+B(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FcWbX26%2FbtqBS6YNfuo%2FAAAAAAAAAAAAAAAAAAAAAMYShUXrF8IALny-y47cF6znxPO44hWymLaZiNBTabPH%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DB6Lt2Sh3euyzI8C2NiyQe%252BTl38s%253D)
import sys n = sys.stdin.readline() n= int(n) for i in range(n): line= sys.stdin.readline() a,b = line.split() print(int(a)+int(b)) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class b_15552 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamRe..
![[백준 알고리즘] 10950번 A+B-3 (Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FlcP4f%2FbtqBWr8iRay%2FAAAAAAAAAAAAAAAAAAAAAOKIMqoiyCOCzXaaLRqTB0ffgScy4Zq8tJzEKczjm48k%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D3YQuja5doebGGDBJBLy6Vj5uHrA%253D)
n = int(input()) for i in range(n): a,b = input().split() print(int(a)+int(b)) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class b_10950 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLin..
![[백준 알고리즘] 2884번 알람 시계(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FdAXVjk%2FbtqBVglPrGm%2FAAAAAAAAAAAAAAAAAAAAAP--ju8uFrUSIEJMed1tQRDSRVWK-IGRQEZTYBcI9eA7%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DZ6ahM8UkMS52HKGquuHp6z9G0hM%253D)
h, m = input().split() h, m = int(h), int(m) if m0: h -= 1 else: #h==0인경우 h = 23 m = 60-(45-m) else: m = m-45 print(h, m) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class b_2884 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System..
![[백준알고리즘] 2753번 윤년(Python3, Java)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2Fyuevt%2FbtqBTMeJH8T%2FAAAAAAAAAAAAAAAAAAAAAKB4livva-B1qK-3cohI29-Z6sdJ8flAhKFOd3RxPBSm%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D4lAqIr4iQ5Em0wtadhvBRMJz9Uc%253D)
year = int(input()) if (year%4 == 0 and year%100 != 0) or year%400 ==0: print(1) else: print(0) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int year = Integer.parseInt(br.readLine()); if(((year%4..