Guest User

Untitled

a guest
Feb 24th, 2020
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.lang.Integer.parseInt
  2.  
  3. fun main(){
  4.  
  5.     var arr=IntArray(4)
  6.     var res=IntArray(3)
  7.     for (i in 0..3 ){
  8.         arr[i]= readLine()!!.toInt()
  9.     }
  10.  
  11.     arr.sort();
  12.     var max=arr[3]
  13.  
  14.     for (k in 0..2 ){
  15.         res[k]=max-arr[k]
  16.     }
  17.     for (k in 0..2 ){
  18.         println(res[k]);
  19.     }
  20.  
  21.  
  22.  
  23.  
  24. }
RAW Paste Data