blob: d44f633dc603c850bf0cf37a94a8a6ea77ca5005 (
plain) (
tree)
|
|
import java.util.*;
public class Roman {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int p = sc.nextInt();
int d = sc.nextInt();
int z = sc.nextInt();
int dan = 0;
while (p > 0 && d > 0) {
System.out.println(++dan + ": " + p + " -> " + (p-d > 0 ? p-d : 0));
p -= d;
d -= z;
}
}
}
|