Notice
Recent Posts
Recent Comments
Link
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags more
Archives
Today
Total
관리 메뉴

난 정말 최고야 멋있어

백준 알고리즘 기초 강의 1 입출력 본문

하루 1공부

백준 알고리즘 기초 강의 1 입출력

n00bh4cker 2021. 1. 31. 21:14
// 1000 번
import java.util.*;

public class Main { // class이름은 Main으로 안하면 컴파일 에러!!
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a, b;
		a = sc.nextInt();
		b = sc.nextInt();
		System.out.println(a + b);
	}
}
//2558
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a, b;
		a = sc.nextInt();
		b = sc.nextInt();
		System.out.println(a + b);
	}
}
//10950
import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0 ; i < n ; i++){
			int j,k;
			j = sc.nextInt();
			k = sc.nextInt();
			System.out.println(j + k);
		}
	}
}
//10951
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int j, k;
		while (sc.hasNextInt()){
			j = sc.nextInt();
			k = sc.nextInt();
			System.out.println(j + k);
		}
	}
}
//10952
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while (true){
			int j, k;
			j = sc.nextInt();
			k = sc.nextInt();
			if (j == k && k == 0)
				break;
			System.out.println(j + k);
		}
	}

}
//10953
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0 ; i < n ; i++){
			String s = sc.next();
			System.out.println(s.charAt(0) + s.charAt(2) - '0' * 2);
		}
	}
}
//11021
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		for (int i = 1 ; i <= T ; i++){
			int j = sc.nextInt();
			int k = sc.nextInt();
			System.out.println(String.format("Case #%d: %d", i, j + k));
		}
	}
}
//11022
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 1 ; i <= n ; i++){
			int j, k ;
			j = sc.nextInt();
			k = sc.nextInt();
			System.out.println(String.format("Case #%d: %d + %d = %d", i, j, k , j + k));
		}
	}
}

 

뭔가 배우나 싶었떠니..

그냥 간단히 시간복잡도에 관ㄴ한 설명

따로 문제에 관한설명은 많진 않았다 워낙 쉬운 문제기도 하고

역시 공부는 나혼자하는게 맞나 싶다

 

일단 그래도 기초 문제들이지만 자바로 한번 풀어봐야겠따..

난 자알못이니까 또르르 ㅠ,,

 

 

 

'하루 1공부' 카테고리의 다른 글

백준 알고리즘 기초강의 2 -2 큐 덱 문자열  (0) 2021.02.03
백준 알고리즘 기초강의 2 스택  (0) 2021.02.01
줄세우기 위상정렬 with 큐  (0) 2021.01.30
퇴사  (0) 2021.01.27
거스름돈  (0) 2021.01.27