Advertisement
snaptrap013

Pyqah

Oct 14th, 2020 (edited)
725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         int a, b, c;
  7.         Scanner input = new Scanner(System.in);
  8.         int X = input.nextInt();
  9.         int Y = input.nextInt();
  10.         int Z = input.nextInt();
  11.         input.close();
  12.         if((c = X % Y) != 0)
  13.             if((b = (X - c)/ Y % Z) != 0)
  14.                 a = (((X - c)/ Y)-b) / Z;
  15.             else
  16.                 a = ((X - c)/ Y) / Z;
  17.         else
  18.             if((b = (X / Y) % Z) != 0)
  19.                 a = ((X / Y)-b) / Z;
  20.             else
  21.                 a = (X / Y) / Z;
  22.         System.out.println(a+" "+b+" "+c);
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement