Skip to content

Commit 7419895

Browse files
authored
[BOJ] 18330 Petrol (B4)
1 parent 3adf96a commit 7419895

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

정건우/7주차/260209.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import java.util.Scanner;
2+
3+
public class BOJ_B4_18330_Petrol {
4+
public static void main(String[] args) {
5+
Scanner scann = new Scanner(System.in);
6+
7+
int N = scann.nextInt();
8+
int K = scann.nextInt();
9+
10+
int card = K+60;
11+
12+
if(N <= card) {
13+
System.out.println(N*1500);
14+
} else {
15+
System.out.println(card*1500 + (N-card)*3000);
16+
}
17+
18+
}
19+
}

0 commit comments

Comments
 (0)