-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package B4; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Boj_11121_Communication_Channels { | ||
public static void main(String[] args) { | ||
Scanner sc = new Scanner(System.in); | ||
|
||
// 입력받는 T(전송 개수) | ||
int T = sc.nextInt(); | ||
sc.nextLine(); // 버퍼 비우기 | ||
|
||
for (int i = 0; i < T; i++) { | ||
// 각 전송의 입력과 출력 읽기 | ||
String transmission = sc.nextLine(); | ||
String[] parts = transmission.split(" "); | ||
String input = parts[0]; | ||
String output = parts[1]; | ||
|
||
// 입력과 출력 비교 | ||
if (input.equals(output)) { | ||
System.out.println("OK"); | ||
} else { | ||
System.out.println("ERROR"); | ||
} | ||
} | ||
} | ||
} |