Skip to content

Commit

Permalink
CT_357
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-Good committed Jan 11, 2025
1 parent b4c2208 commit 4a10865
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions BOJ/Java/src/B4/Boj_31994_강당대관.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package B4;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;

public class Boj_31994_강당대관 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

String str = "";
int max = 0;

for (int i = 0; i < 7; i++) {
StringTokenizer st = new StringTokenizer(br.readLine());
String temp = st.nextToken();
int num = Integer.parseInt(st.nextToken());
if (max < num) {
max = num;
str = temp;
}
}

bw.write(str);
bw.flush();
}
}

0 comments on commit 4a10865

Please sign in to comment.