Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- public class Bus {
- public static void main(String[] args) throws Exception {
- int i,j,k;
- BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- int N = Integer.parseInt(br.readLine());
- int M = Integer.parseInt(br.readLine());
- br.close();
- int min = 0;
- int max = 0;
- // Vasiot kod tuka
- max = 100*N+(M-1)*100;
- if (M <= 1) {
- max = 100*N;
- min = max;
- } else if (N < M) {
- min = (M-N+1)*100 + (N-1)*100;
- } else {
- min = M*100 + (N-M)*100;
- }
- System.out.println(min);
- System.out.println(max);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement