Skip to content

Commit

Permalink
[SOLVED] 너의 평점은 [S5]
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhoJJang committed Sep 3, 2024
1 parent 7c5491c commit ec6a1cb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions 25206번: 너의 평점은/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
public class Main {

static Map<String, Double> grade = Map.of(
"A+", 4.5,
"A0", 4.0,
"B+", 3.5,
"B0", 3.0,
"C+", 2.5,
"C0", 2.0,
"D+", 1.5,
"D0", 1.0,
"F", 0.0
);
"A+", 4.5,
"A0", 4.0,
"B+", 3.5,
"B0", 3.0,
"C+", 2.5,
"C0", 2.0,
"D+", 1.5,
"D0", 1.0,
"F", 0.0);

public static void main(String[] args) throws IOException{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

double[] sum = new double[2];
int N = 20;
int N = 20;

while(N-- > 0) {
while (N-- > 0) {
String[] input = br.readLine().split(" ");
if(input[2].equals("P")) continue;
if (input[2].equals("P"))
continue;
sum[0] += grade.get(input[2]) * Double.parseDouble(input[1]);
sum[1] += Double.parseDouble(input[1]);
}
Expand Down

0 comments on commit ec6a1cb

Please sign in to comment.