Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 자바
- git
- MariaDB
- 리눅스
- Javascript
- Linux
- analytics4
- java
- rsync
- group by
- DBMS
- MongoDB
- SQL
- top
- API
- 티스토리챌린지
- network
- 오블완
- JPA
- 명령어
- docker
- Python
- IntelliJ
- spring
- mssql
- 트랜잭션
- oracle
- PostgreSQL
- mysql
- 차이점
Archives
- Today
- Total
hanker
백준(3009) JAVA - 네 번째 점 본문
반응형
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int e = sc.nextInt();
int f = sc.nextInt();
int x = a;
int y = b;
if(x == c){
x = e;
} else if (x == e){
x = c;
}
if(y == d){
y = f;
} else if(y == f){
y = d;
}
System.out.println(x + " " + y);
}
}
반응형
'Study > ALGORITHM' 카테고리의 다른 글
백준(3053) JAVA - 택시 기하학 (0) | 2021.07.07 |
---|---|
백준(4153) JAVA - 직각삼각형 (0) | 2021.06.29 |
백준(1085) JAVA - 직사각형에서 탈출 (0) | 2021.06.25 |
백준(9020) JAVA - 골드바흐의 추측 (0) | 2021.06.24 |
백준(4948) JAVA - 베르트랑 공준 (0) | 2021.05.12 |