[백준 알고리즘] 2577번 숫자의 개수(Python 3, Java)
언어, 알고리즘 공부/백준2020. 2. 11. 23:23[백준 알고리즘] 2577번 숫자의 개수(Python 3, Java)

a = int(input()) b = int(input()) c = int(input()) list = [0 for _ in range(10)] mul = str(a * b * c) for i in range(len(mul)): list[int(mul[i])] += 1 for i in list: print(i) 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 InputSt..

[백준 알고리즘] 2562번 최댓값(Python 3, Java)
언어, 알고리즘 공부/백준2020. 2. 11. 23:10[백준 알고리즘] 2562번 최댓값(Python 3, Java)

a = list() for i in range(9): a.append(int(input())) print(max(a), a.index(max(a))+1) 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 max = 0; int max_idx = 0; for(int i=0; imax){ max = num; max_..

[백준 알고리즘] 10818번 최소, 최대(Python3, Java)
언어, 알고리즘 공부/백준2020. 2. 11. 23:05[백준 알고리즘] 10818번 최소, 최대(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 22:43[백준 알고리즘] 1110번 더하기 사이클(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 18:10[백준 알고리즘] 10951번 A+B - 4(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 18:02[백준 알고리즘] 10952번 A+B - 5(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 17:53[백준 알고리즘] 11022번 A+B - 8(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 17:47[백준 알고리즘] 11021번 A+B - 7(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 17:31[백준 알고리즘] 1552번 빠른 A+B(Python3, Java)

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)
언어, 알고리즘 공부/백준2020. 2. 11. 17:20[백준 알고리즘] 10950번 A+B-3 (Python3, Java)

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..

image