Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- int a, b, c;
- Scanner input = new Scanner(System.in);
- int X = input.nextInt();
- int Y = input.nextInt();
- int Z = input.nextInt();
- input.close();
- if((c = X % Y) != 0)
- if((b = (X - c)/ Y % Z) != 0)
- a = (((X - c)/ Y)-b) / Z;
- else
- a = ((X - c)/ Y) / Z;
- else
- if((b = (X / Y) % Z) != 0)
- a = ((X / Y)-b) / Z;
- else
- a = (X / Y) / Z;
- System.out.println(a+" "+b+" "+c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement