snaptrap013 icon

Pyqah

snaptrap013 | PRO | 10/21/20 01:08:03 AM UTC (Edited) | 0 ⭐ | 863 👁️ | Never ⏰ | []
Java |

640 B

|

None

|

0 👍

/

0 👎

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);
    }
}
 

Comments