metalni

Aps 1. Kolokvium Avtobus

Nov 25th, 2020 (edited)
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.InputStreamReader;
  3.  
  4. public class Bus {
  5.    
  6.     public static void main(String[] args) throws Exception {
  7.         int i,j,k;
  8.        
  9.         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  10.        
  11.         int N = Integer.parseInt(br.readLine());
  12.         int M = Integer.parseInt(br.readLine());
  13.        
  14.         br.close();
  15.  
  16.         if(M > N)
  17.             System.out.println((M-N)* 100 + N*100);
  18.         else
  19.             System.out.println(N*100);
  20.        
  21.         if(M == 0)
  22.             System.out.println(N*100 + (M)*100);
  23.         else
  24.             System.out.println(N*100 + (M-1)*100);
  25.        
  26.        
  27.     }
  28.    
  29. }
  30. // I HAVE NO IDEA WHAT IS THIS EXERCISE FFS IDK HOW IT'S RIGHT BUT IT WORKS FUCK IT
Add Comment
Please, Sign In to add comment